[cli] Bug fix for 64-bit machines

Erven Rohou erven.rohou@inria.fr
Tue Feb 9 13:21:00 GMT 2010


Just commited a bug fix for 64-bit machines.

--
Erven.

2010-02-09  Erven Rohou <erven.rohou@inria.fr>

	* config/cil32/emit-cil32.c: Bug fix for 64-bit machines.


Index: config/cil32/emit-cil.c
===================================================================
--- config/cil32/emit-cil.c     (revision 156424)
+++ config/cil32/emit-cil.c     (working copy)
@@ -1560,6 +1560,10 @@

             real_to_target (buf, &d, TYPE_MODE (type));
             real_to_decimal (string, &d, sizeof (string), 0, 1);
+           /* On 64-bit machines, we need to drop high 32 bits to print the
+              value properly. real_to_target guarantees that only 32 bits are
+              set, no matter the size of the host long.  */
+           buf[1] &= 0xffffffffl;
             fprintf (file, "float64(%#08lx%08lx)\t/* %s */",
                      buf[1], buf[0], string);
           }



More information about the Gcc-patches mailing list