This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch: Java: Fix jcf-write fold() fallout


Bryce McKinlay wrote:

Does this look correct?

Looks plausible.


A comment would be nice. Something like:

UNLT_EXPR(a, b) means 'a < b || unordered(a, b)'.  This is the same
as the Java source expression '!(a >= b)', so handle it that way.

Index: jcf-write.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/jcf-write.c,v
retrieving revision 1.145
diff -u -r1.145 jcf-write.c
--- jcf-write.c 28 May 2004 23:59:49 -0000      1.145
+++ jcf-write.c 29 May 2004 00:52:01 -0000
@@ -1179,25 +1179,25 @@
      op = OPCODE_if_icmpne;
      goto compare;

-    case UNLT_EXPR:
+    case UNLE_EXPR:
      unordered = 1;
    case GT_EXPR:
      op = OPCODE_if_icmpgt;
      goto compare;

-    case UNGT_EXPR:
+    case UNGE_EXPR:
      unordered = 1;
    case LT_EXPR:
      op = OPCODE_if_icmplt;
      goto compare;

-    case UNLE_EXPR:
+    case UNLT_EXPR:
      unordered = 1;
    case GE_EXPR:
      op = OPCODE_if_icmpge;
      goto compare;

-    case UNGE_EXPR:
+    case UNGT_EXPR:
      unordered = 1;
    case LE_EXPR:
      op = OPCODE_if_icmple;

Bryce


--
	--Per Bothner
per@bothner.com   http://per.bothner.com/


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