mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-30 21:06:03 +08:00
jcf-parse.c (get_constant): Decode from IEEE no matter what the target format.
* jcf-parse.c (get_constant): Decode from IEEE no matter what the target format. From-SVN: r57389
This commit is contained in:
parent
3dc85dfb4a
commit
aa2046c41f
@ -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.
|
||||
|
@ -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:
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user