summaryrefslogtreecommitdiff
path: root/sim/arm
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2000-06-22 20:42:34 +0000
committerAlexandre Oliva <aoliva@redhat.com>2000-06-22 20:42:34 +0000
commit072267bbf7a089301f2af0beb70ae54d6af2b630 (patch)
tree294c884de2a67809d606c616f64677c7a428509c /sim/arm
parent34f777747ffe6c77f031cac6e6c26010e2778b97 (diff)
downloadgdb-072267bbf7a089301f2af0beb70ae54d6af2b630.tar.gz
* armemu.c (Multiply64): Fix computation of flag N.
Diffstat (limited to 'sim/arm')
-rw-r--r--sim/arm/ChangeLog2
-rw-r--r--sim/arm/armemu.c7
2 files changed, 5 insertions, 4 deletions
diff --git a/sim/arm/ChangeLog b/sim/arm/ChangeLog
index 4780f0a2a6e..c0990c72b40 100644
--- a/sim/arm/ChangeLog
+++ b/sim/arm/ChangeLog
@@ -1,5 +1,7 @@
2000-06-22 Alexandre Oliva <aoliva@cygnus.com>
+ * armemu.c (Multiply64): Fix computation of flag N.
+
* armemu.c (MultiplyAdd64): Fix computation of flag N.
2000-06-20 Alexandre Oliva <aoliva@cygnus.com>
diff --git a/sim/arm/armemu.c b/sim/arm/armemu.c
index 426617d6bb3..e4e963ba3c8 100644
--- a/sim/arm/armemu.c
+++ b/sim/arm/armemu.c
@@ -3819,10 +3819,9 @@ Multiply64 (ARMul_State * state, ARMword instr, int msigned, int scc)
if (scc)
{
- if ((RdHi == 0) && (RdLo == 0))
- ARMul_NegZero (state, RdHi); /* zero value */
- else
- ARMul_NegZero (state, scc); /* non-zero value */
+ /* Ensure that both RdHi and RdLo are used to compute Z, but
+ don't let RdLo's sign bit make it to N. */
+ ARMul_NegZero (state, RdHi | (RdLo >> 16) | (RdLo & 0xFFFF));
}
/* The cycle count depends on whether the instruction is a signed or