Patch: Fix PR libgcj/15719 (not checked in)

Tom Tromey tromey@redhat.com
Wed Dec 22 02:57:00 GMT 2004


This patch fixes PR libgcj/15719.  The interpreter reversed the dcmpl
and dcmpg opcodes.  Oops.  This is only noticeable if one operand is
NaN.  fcmpl and fcmpg are fine.

Since this doesn't appear to be a regression (I only checked 3.3 and
3.4), I'm not yet committing it.

FWIW I'm planning to send email to Mark asking for special rules for
libgcj.  We've collected a number of straightforward, helpful bug
fixes that would be nice to have for 4.0.

Tom

Index: ChangeLog
from  Tom Tromey  <tromey@redhat.com>

	PR libgcj/15719:
	* interpret.cc (run) <insn_dcmpl, insn_dcmpg>: Set tmpval
	correctly.

Index: interpret.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/interpret.cc,v
retrieving revision 1.47
diff -u -r1.47 interpret.cc
--- interpret.cc 25 Nov 2004 03:46:56 -0000 1.47
+++ interpret.cc 21 Dec 2004 20:30:49 -0000
@@ -2087,11 +2087,11 @@
       NEXT_INSN;
 
     insn_dcmpl:
-      tmpval = 1;
+      tmpval = -1;
       goto dcmp;
 
     insn_dcmpg:
-      tmpval = -1;
+      tmpval = 1;
 
     dcmp:
       {



More information about the Java-patches mailing list