diff options
author | jsturm <jsturm@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-01-12 00:01:41 +0000 |
---|---|---|
committer | jsturm <jsturm@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-01-12 00:01:41 +0000 |
commit | 4e69e33be0cf8281859b7aa0ad6f08e87e719e05 (patch) | |
tree | a1f455e8ed05717a32430e0e4a655f1fa5115c60 /gcc/java | |
parent | 666954ce076b3937285c864f7f0fc14857b6e2e2 (diff) | |
download | gcc-4e69e33be0cf8281859b7aa0ad6f08e87e719e05.tar.gz |
* jcf-parse.c (get_constant): Don't swap lo/hi for big
endian targets when HOST_BITS_PER_WIDE_INT >= 64.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@48786 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/java')
-rw-r--r-- | gcc/java/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/java/jcf-parse.c | 10 |
2 files changed, 15 insertions, 1 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index cc8c4059b6c..ed8078c415c 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,9 @@ +2001-01-10 Jeff Sturm <jsturm@one-point.com> + Martin Kahlert <martin.kahlert@infineon.com> + + * jcf-parse.c (get_constant): Don't swap lo/hi for big + endian targets when HOST_BITS_PER_WIDE_INT >= 64. + 2002-01-03 Graham Stott <grahams@redhat.com> * class.c (compile_resource_file): Update copyright date. diff --git a/gcc/java/jcf-parse.c b/gcc/java/jcf-parse.c index 2841d5f5f84..4e83b2ab2f6 100644 --- a/gcc/java/jcf-parse.c +++ b/gcc/java/jcf-parse.c @@ -326,7 +326,15 @@ 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) + + /* Since ereal_from_double expects an array of HOST_WIDE_INT + in the target's format, we swap the elements for big endian + targets, unless HOST_WIDE_INT is sufficiently large to + contain a target double, in which case the 2nd element + is ignored. + + FIXME: Is this always right for cross targets? */ + if (FLOAT_WORDS_BIG_ENDIAN && sizeof(num[0]) < 8) { num[0] = hi; num[1] = lo; |