public inbox for java-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [gcjx] Patch: FYI: fix handling of double literals
@ 2005-10-11  0:21 Tom Tromey
  0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2005-10-11  0:21 UTC (permalink / raw)
  To: Java Patch List

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);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-10-11  0:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-11  0:21 [gcjx] Patch: FYI: fix handling of double literals Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).