From: Alexandre Oliva Date: Thu, 22 Jun 2000 20:42:34 +0000 (+0000) Subject: * armemu.c (Multiply64): Fix computation of flag N. X-Git-Tag: readline-pre-41-import~117 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f9c22bc3a4d6ae79f94ff339404fc0037b065589;p=external%2Fbinutils.git * armemu.c (Multiply64): Fix computation of flag N. --- diff --git a/sim/arm/ChangeLog b/sim/arm/ChangeLog index 4780f0a..c0990c7 100644 --- a/sim/arm/ChangeLog +++ b/sim/arm/ChangeLog @@ -1,5 +1,7 @@ 2000-06-22 Alexandre Oliva + * armemu.c (Multiply64): Fix computation of flag N. + * armemu.c (MultiplyAdd64): Fix computation of flag N. 2000-06-20 Alexandre Oliva diff --git a/sim/arm/armemu.c b/sim/arm/armemu.c index 426617d..e4e963b 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