diff options
author | Andrew Haley <aph@redhat.com> | 2002-04-22 16:55:39 +0000 |
---|---|---|
committer | Andrew Haley <aph@gcc.gnu.org> | 2002-04-22 16:55:39 +0000 |
commit | a2761d68260d30936bae7d598a6055cf5dead60b (patch) | |
tree | 13ebed8b94cdb76ebae4e89858eb16469cce9931 /gcc/java/jcf-parse.c | |
parent | 0a528c61ffcb1cc7bc7057b18268745bdd5eb37f (diff) | |
download | gcc-a2761d68260d30936bae7d598a6055cf5dead60b.zip gcc-a2761d68260d30936bae7d598a6055cf5dead60b.tar.gz gcc-a2761d68260d30936bae7d598a6055cf5dead60b.tar.bz2 |
jcf-write.c (push_long_const): lo, hi: New variables.
2002-04-19 Andrew Haley <aph@redhat.com>
* jcf-write.c (push_long_const): lo, hi: New variables.
Use rshift_double to extract the high part of a 64-bit long.
Use WORD_TO_INT to extract the low part.
* jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned
HOST_WIDE_INT for num. Use JPOOL_UINT to get it.
CONSTANT_Double: Use JPOOL_UINT to get both halve of a double.
From-SVN: r52618
Diffstat (limited to 'gcc/java/jcf-parse.c')
-rw-r--r-- | gcc/java/jcf-parse.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/java/jcf-parse.c b/gcc/java/jcf-parse.c index 53e647c..cbf5ac9 100644 --- a/gcc/java/jcf-parse.c +++ b/gcc/java/jcf-parse.c @@ -292,10 +292,10 @@ get_constant (jcf, index) } case CONSTANT_Long: { - jint num = JPOOL_INT (jcf, index); + unsigned HOST_WIDE_INT num = JPOOL_UINT (jcf, index); HOST_WIDE_INT lo, hi; lshift_double (num, 0, 32, 64, &lo, &hi, 0); - num = JPOOL_INT (jcf, index+1) & 0xffffffff; + num = JPOOL_UINT (jcf, index+1); add_double (lo, hi, num, 0, &lo, &hi); value = build_int_2 (lo, hi); TREE_TYPE (value) = long_type_node; @@ -316,9 +316,9 @@ get_constant (jcf, index) HOST_WIDE_INT num[2]; REAL_VALUE_TYPE d; HOST_WIDE_INT lo, hi; - num[0] = JPOOL_INT (jcf, index); + num[0] = JPOOL_UINT (jcf, index); lshift_double (num[0], 0, 32, 64, &lo, &hi, 0); - num[0] = JPOOL_INT (jcf, index+1); + num[0] = JPOOL_UINT (jcf, index+1); add_double (lo, hi, num[0], 0, &lo, &hi); /* Since ereal_from_double expects an array of HOST_WIDE_INT |