diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2000-06-22 20:03:32 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@redhat.com> | 2000-06-22 20:03:32 +0000 |
commit | ee9a777240baf90e8c9714963fb791884162048c (patch) | |
tree | 4a9b6484785bf10bae7260fba4f939d2153928b6 /sim/arm/armemu.c | |
parent | Check dependecies for leading `/' in this dir too. (diff) | |
download | binutils-gdb-ee9a777240baf90e8c9714963fb791884162048c.tar.gz binutils-gdb-ee9a777240baf90e8c9714963fb791884162048c.tar.bz2 binutils-gdb-ee9a777240baf90e8c9714963fb791884162048c.zip |
* armemu.c (MultiplyAdd64): Fix computation of flag N.
Diffstat (limited to 'sim/arm/armemu.c')
-rw-r--r-- | sim/arm/armemu.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sim/arm/armemu.c b/sim/arm/armemu.c index acbcb752959..426617d6bb3 100644 --- a/sim/arm/armemu.c +++ b/sim/arm/armemu.c @@ -3871,10 +3871,9 @@ MultiplyAdd64 (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)); } return scount + 1; /* extra cycle for addition */ |