gcj/321

Jeff Sturm jsturm@detroit.appnet.com
Sat Aug 19 10:16:00 GMT 2000


The following reply was made to PR gcj/321; it has been noted by GNATS.

From: Jeff Sturm <jsturm@detroit.appnet.com>
To: java-gnats@sourceware.cygnus.com
Cc:  
Subject: Re: gcj/321
Date: Sat, 19 Aug 2000 13:16:01 -0400

 (This is a resend after my original mail bounced... is java-prs a read-only
 list?)
 
 Anthony Green wrote:
 > Did you try test_long.java?   What was your patch, exactly?
 
 Yes, test_long.java works for me when compiled from either source or bytecode.
 
 This isn't a "patch" really, more like a quick hack... the gcj code as it is
 still isn't portable, and probably won't be easy to fix.
 
 In short, since jword and jint must be the same size, the xor and sub statements
 negate each other, and WORD_TO_INT becomes nothing but a cast:
 
 Index: javaop.h
 ===================================================================
 RCS file: /cvs/gcc/egcs/gcc/java/javaop.h,v
 retrieving revision 1.8
 diff -u -p -r1.8 javaop.h
 --- javaop.h    2000/05/03 18:09:27     1.8
 +++ javaop.h    2000/08/19 15:53:35
 @@ -113,10 +113,7 @@ WORD_TO_FLOAT(jword w)
  static inline jint
  WORD_TO_INT(jword w)
  {
 -  jint n = w;
 -  n ^= (jint)1 << 31;
 -  n -= (jint)1 << 31;
 -  return n;
 +  return (jint)w;
  } 
  
  static inline jlong


More information about the Java-prs mailing list