* java/lang/Double.java (doubleToRawLongBits): Now native.
* java/lang/Float.java (floatToRawIntBits): Likewise.
* java/lang/natDouble.cc (doubleToRawLongBits): New method.
* java/lang/natFloat.cc (floatToRawIntBits): Likewise.
From-SVN: r39572
+2001-02-09 Bryce McKinlay <bryce@albatross.co.nz>
+
+ * java/lang/Double.java (doubleToRawLongBits): Now native.
+ * java/lang/Float.java (floatToRawIntBits): Likewise.
+ * java/lang/natDouble.cc (doubleToRawLongBits): New method.
+ * java/lang/natFloat.cc (floatToRawIntBits): Likewise.
+
2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
* java/io/File.java (java.net): Imported.
}
public static native long doubleToLongBits (double value);
-
- public static long doubleToRawLongBits (double value)
- {
- // FIXME: Check that this is correct with respect to NaN values.
- return doubleToLongBits (value);
- }
-
+ public static native long doubleToRawLongBits (double value);
public static native double longBitsToDouble (long bits);
public int compareTo (Double d)
}
public static native int floatToIntBits (float value);
-
- public static int floatToRawIntBits (float value)
- {
- // FIXME: Is this supposed to be different? NaN values seem to be handled
- // the same in the JDK.
- return floatToIntBits (value);
- }
-
+ public static native int floatToRawIntBits (float value);
public static native float intBitsToFloat (int bits);
public int compareTo (Float d)
// natDouble.cc - Implementation of java.lang.Double native methods.
-/* Copyright (C) 1998, 1999, 2000 Free Software Foundation
+/* Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation
This file is part of libgcj.
return u.l;
}
+jlong
+java::lang::Double::doubleToRawLongBits(jdouble value)
+{
+ union u u;
+ u.d = value;
+ return u.l;
+}
+
jdouble
java::lang::Double::longBitsToDouble(jlong bits)
{
// natFloat.cc - Implementation of java.lang.Float native methods.
-/* Copyright (C) 1998, 1999 Free Software Foundation
+/* Copyright (C) 1998, 1999, 2001 Free Software Foundation
This file is part of libgcj.
return u.l;
}
+jint
+java::lang::Float::floatToRawIntBits(jfloat value)
+{
+ union u u;
+ u.d = value;
+ return u.l;
+}
+
jfloat
java::lang::Float::intBitsToFloat(jint bits)
{