aboutsummaryrefslogtreecommitdiff
path: root/gcc/java
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2002-09-21 16:16:24 +0000
committerRichard Henderson <rth@redhat.com>2002-09-21 16:16:24 +0000
commit3a9a6ee23724740a25057beccee9c45b2fd8e528 (patch)
tree0e57cc18734dbf546de8e8e5c5c79e0fa50b5b22 /gcc/java
parentc1ede3b61464b08e89b7ceed19c94d2aa414d3a5 (diff)
* jcf-parse.c (get_constant): Decode from IEEE no matter
what the target format. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@57389 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/java')
-rw-r--r--gcc/java/ChangeLog5
-rw-r--r--gcc/java/jcf-parse.c52
2 files changed, 27 insertions, 30 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index 46c11b44518..45776e6e95c 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,8 @@
+2002-09-21 Richard Henderson <rth@redhat.com>
+
+ * jcf-parse.c (get_constant): Decode from IEEE no matter
+ what the target format.
+
2002-09-20 Kazu Hirata <kazu@cs.umass.edu>
* ChangeLog: Follow spelling conventions.
diff --git a/gcc/java/jcf-parse.c b/gcc/java/jcf-parse.c
index 5e7957f07d6..f4bcd998c69 100644
--- a/gcc/java/jcf-parse.c
+++ b/gcc/java/jcf-parse.c
@@ -292,41 +292,33 @@ get_constant (jcf, index)
}
case CONSTANT_Float:
- /* ??? Even more ideal would be to import the number using the
- IEEE decode routines, then use whatever format the target
- actually uses. This would enable Java on VAX to kind work. */
- if (TARGET_FLOAT_FORMAT == IEEE_FLOAT_FORMAT)
- {
- jint num = JPOOL_INT(jcf, index);
- long buf = num;
- REAL_VALUE_TYPE d;
- real_from_target (&d, &buf, SFmode);
- value = build_real (float_type_node, d);
- break;
- }
- else
- goto bad;
+ {
+ jint num = JPOOL_INT(jcf, index);
+ long buf = num;
+ REAL_VALUE_TYPE d;
+
+ real_from_target_fmt (&d, &buf, &ieee_single_format);
+ value = build_real (float_type_node, d);
+ break;
+ }
case CONSTANT_Double:
- if (TARGET_FLOAT_FORMAT == IEEE_FLOAT_FORMAT)
- {
- long buf[2], lo, hi;
- REAL_VALUE_TYPE d;
+ {
+ long buf[2], lo, hi;
+ REAL_VALUE_TYPE d;
- hi = JPOOL_UINT (jcf, index);
- lo = JPOOL_UINT (jcf, index+1);
+ hi = JPOOL_UINT (jcf, index);
+ lo = JPOOL_UINT (jcf, index+1);
- if (FLOAT_WORDS_BIG_ENDIAN)
- buf[0] = hi, buf[1] = lo;
- else
- buf[0] = lo, buf[1] = hi;
+ if (FLOAT_WORDS_BIG_ENDIAN)
+ buf[0] = hi, buf[1] = lo;
+ else
+ buf[0] = lo, buf[1] = hi;
- real_from_target (&d, buf, DFmode);
- value = build_real (double_type_node, d);
- break;
- }
- else
- goto bad;
+ real_from_target_fmt (&d, &buf, &ieee_double_format);
+ value = build_real (double_type_node, d);
+ break;
+ }
case CONSTANT_String:
{