This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Bug on Solaris
- From: Jeff Sturm <jsturm at one-point dot com>
- To: Andrew Haley <aph at cambridge dot redhat dot com>
- Cc: martin dot kahlert at infineon dot com, java at gcc dot gnu dot org
- Date: Wed, 9 Jan 2002 12:43:06 -0500 (EST)
- Subject: Re: Bug on Solaris
On Wed, 9 Jan 2002, Andrew Haley wrote:
> > This makes the byte swap unneccessary on all architectures, doesn't it?
>
> Only if gcj is built with HOST_WIDE_INT == long long. There's no rule
> that says it will be. gcc may be smaller and faster with
> HOST_WIDE_INT == long.
True. I looked again... sparc-solaris defines a `long long' HWI for
bi-arch support. Sparc-linux does not. (In fact I tried Martin's test
program on an unpatched sparc-linux build; it did not fail.)
So perhaps Martin's fix is all that's needed, if someone (Bryce?) can
check it on PPC too:
Index: jcf-parse.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/jcf-parse.c,v
retrieving revision 1.99
diff -u -p -r1.99 jcf-parse.c
--- jcf-parse.c 2001/12/16 16:23:49 1.99
+++ jcf-parse.c 2002/01/09 17:37:44
@@ -325,7 +325,7 @@ get_constant (jcf, index)
lshift_double (num[0], 0, 32, 64, &lo, &hi, 0);
num[0] = JPOOL_INT (jcf, index+1);
add_double (lo, hi, num[0], 0, &lo, &hi);
- if (FLOAT_WORDS_BIG_ENDIAN)
+ if (FLOAT_WORDS_BIG_ENDIAN && sizeof(num[0]) < 8)
{
num[0] = hi;
num[1] = lo;