aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/gjavah.c
diff options
context:
space:
mode:
authorScott Bambrough <scottb@netwinder.org>2000-02-03 06:46:30 +0000
committerTom Tromey <tromey@gcc.gnu.org>2000-02-03 06:46:30 +0000
commit9b4a08f94518411c362661937b7d8ff3a19b2281 (patch)
treeb2c8de68e45959edb1a17ee8a6257c1ae2a1a57f /gcc/java/gjavah.c
parentde3807234afd3fe695900166c35bc120f67a5ef4 (diff)
downloadgcc-9b4a08f94518411c362661937b7d8ff3a19b2281.zip
gcc-9b4a08f94518411c362661937b7d8ff3a19b2281.tar.gz
gcc-9b4a08f94518411c362661937b7d8ff3a19b2281.tar.bz2
gjavah.c (D_NAN_MASK): Alternate definition required when HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1.
2000-01-31 Scott Bambrough <scottb@netwinder.org> * gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1. (java_float_finite): Convert to use union Word from javaop.h. (java_double_finite): Convert to use union DWord from javaop.h. From-SVN: r31768
Diffstat (limited to 'gcc/java/gjavah.c')
-rw-r--r--gcc/java/gjavah.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/gcc/java/gjavah.c b/gcc/java/gjavah.c
index a9d3ae9..6f97a64 100644
--- a/gcc/java/gjavah.c
+++ b/gcc/java/gjavah.c
@@ -30,6 +30,7 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
#include "jcf.h"
#include "tree.h"
+#include "javaop.h"
#include "java-tree.h"
#include "java-opcodes.h"
@@ -204,17 +205,18 @@ static int decompiled = 0;
/* Some useful constants. */
#define F_NAN_MASK 0x7f800000
+#if (1 == HOST_FLOAT_WORDS_BIG_ENDIAN)
+#define D_NAN_MASK 0x000000007ff00000LL
+#else
#define D_NAN_MASK 0x7ff0000000000000LL
+#endif
/* Return 1 if F is not Inf or NaN. */
static int
java_float_finite (f)
jfloat f;
{
- union {
- jfloat f;
- int32 i;
- } u;
+ union Word u;
u.f = f;
/* We happen to know that F_NAN_MASK will match all NaN values, and
@@ -228,14 +230,11 @@ static int
java_double_finite (d)
jdouble d;
{
- union {
- jdouble d;
- int64 i;
- } u;
+ union DWord u;
u.d = d;
/* Now check for all NaNs. */
- return (u.i & D_NAN_MASK) != D_NAN_MASK;
+ return (u.l & D_NAN_MASK) != D_NAN_MASK;
}
static void