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
+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.
+
2000-02-02 Tom Tromey <tromey@cygnus.com>
* gjavah.c (options): Added `jni' entry.
#include "jcf.h"
#include "tree.h"
+#include "javaop.h"
#include "java-tree.h"
#include "java-opcodes.h"
/* 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
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