This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[gcjx] Patch: FYI: fix handling of double literals


I'm checking this in on the gcjx branch.

This fixes the handling of double literals on little endian machines.

Tom

Index: ChangeLog
from  Tom Tromey  <tromey@redhat.com>
	* tree.cc (handle_double): Swap words on little endian machines.

Index: tree.cc
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/Attic/tree.cc,v
retrieving revision 1.1.2.57
diff -u -r1.1.2.57 tree.cc
--- tree.cc 10 Oct 2005 20:22:47 -0000 1.1.2.57
+++ tree.cc 11 Oct 2005 00:20:19 -0000
@@ -2110,8 +2110,13 @@
   jint w[2];
   double_to_words (w, val);
   long wl[2];
+#ifdef WORDS_BIGENDIAN
   wl[0] = w[0];
   wl[1] = w[1];
+#else
+  wl[0] = w[1];
+  wl[1] = w[0];
+#endif // WORDS_BIGENDIAN
   REAL_VALUE_TYPE d;
   real_from_target_fmt (&d, wl, &ieee_double_format);
   return build_real (type_jdouble, d);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]