This is the mail archive of the gdb-patches@sourceware.cygnus.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

ARM's N flag is miscomputed in `mlal'


I'm checking this in, approved by Nick Clifton:

Index: sim/arm/ChangeLog
from  Alexandre Oliva  <aoliva@cygnus.com>

	* armemu.c (MultiplyAdd64): Fix computation of flag N.

Index: sim/arm/armemu.c
===================================================================
RCS file: /cvs/src/src/sim/arm/armemu.c,v
retrieving revision 1.4
diff -u -r1.4 armemu.c
--- sim/arm/armemu.c	2000/05/30 17:13:37	1.4
+++ sim/arm/armemu.c	2000/06/22 19:57:42
@@ -3871,10 +3871,9 @@
 
   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 */


-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]