diff options
author | Andrew Haley <aph@cygnus.com> | 2000-08-29 16:12:59 +0000 |
---|---|---|
committer | Alexandre Petit-Bianco <apbianco@gcc.gnu.org> | 2000-08-29 09:12:59 -0700 |
commit | 9b1ee05b0e2a948a2612dcc6b9835a91ee855f99 (patch) | |
tree | 9e8a6be704176c42bc696fce9ce76e1e2f26270b /gcc/java/jcf-parse.c | |
parent | dc478a5dd45f10a1c9d42230a3eb6c6aa1e50a1d (diff) | |
download | gcc-9b1ee05b0e2a948a2612dcc6b9835a91ee855f99.zip gcc-9b1ee05b0e2a948a2612dcc6b9835a91ee855f99.tar.gz gcc-9b1ee05b0e2a948a2612dcc6b9835a91ee855f99.tar.bz2 |
javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before sign extending.
2000-08-22 Andrew Haley <aph@cygnus.com>
* javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
sign extending. Fixes gcj/321.
* jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
combining to make a jlong. Fixes gcj/321.
(This fixes gcj/321:
http://sources.redhat.com/ml/java-prs/2000-q3/msg00146.html
http://gcc.gnu.org/ml/gcc-patches/2000-08/msg00897.html)
From-SVN: r36037
Diffstat (limited to 'gcc/java/jcf-parse.c')
-rw-r--r-- | gcc/java/jcf-parse.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/java/jcf-parse.c b/gcc/java/jcf-parse.c index 1962f80..4b00c43 100644 --- a/gcc/java/jcf-parse.c +++ b/gcc/java/jcf-parse.c @@ -270,8 +270,8 @@ get_constant (jcf, index) jint num = JPOOL_INT (jcf, index); HOST_WIDE_INT lo, hi; lshift_double (num, 0, 32, 64, &lo, &hi, 0); - num = JPOOL_INT (jcf, index+1); - add_double (lo, hi, (uint32)num, 0, &lo, &hi); + num = JPOOL_INT (jcf, index+1) & 0xffffffff; + add_double (lo, hi, num, 0, &lo, &hi); value = build_int_2 (lo, hi); TREE_TYPE (value) = long_type_node; force_fit_type (value, 0); |