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: Tue, 8 Jan 2002 16:42:59 -0500 (EST)
- Subject: Re: Bug on Solaris
On Tue, 8 Jan 2002, Andrew Haley wrote:
> It is, however, a front end bug that manifests itself only when
> running on SPARC. Endian, perhaps?
Perhaps. There's a problem while reading in the constant pool from an
existing class file. (If it is a big-endian problem, shouldn't it fail on
PPC too?)
I'm looking at jcf-parse.c:get_constant. This code looks suspicious:
case CONSTANT_Double:
{
HOST_WIDE_INT num[2];
REAL_VALUE_TYPE d;
HOST_WIDE_INT lo, hi;
num[0] = JPOOL_INT (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)
{
num[0] = hi;
num[1] = lo;
}
...
For one thing, if HOST_WIDE_INT is 64 bits, then "lo" contains the entire
number and we must not swap, right?
Jeff