Small Sparc64 native fix

David S. Miller davem@jenolan.rutgers.edu
Thu Oct 2 09:14:00 GMT 1997


This does not show up on cross builds, but does on native builds.

Thu Oct  2 12:09:48 1997  David S. Miller  <davem@tanya.rutgers.edu>

	* config/sparc/sparc.c (output_double_int): Output DI mode values
	correctly when HOST_BITS_PER_WIDE_INT is 64.

--- config/sparc/sparc.c.~1~	Wed Sep 24 21:10:47 1997
+++ config/sparc/sparc.c	Thu Oct  2 12:09:41 1997
@@ -4258,11 +4258,21 @@
 {
   if (GET_CODE (value) == CONST_INT)
     {
+#if HOST_BITS_PER_WIDE_INT == 64
+      HOST_WIDE_INT xword = INTVAL (value);
+      HOST_WIDE_INT high, low;
+
+      high = (xword >> 32);
+      low  = (xword & (((HOST_WIDE_INT) 1 << 32) - 1));
+      ASM_OUTPUT_INT (file, gen_rtx (CONST_INT, VOIDmode, high));
+      ASM_OUTPUT_INT (file, gen_rtx (CONST_INT, VOIDmode, low));
+#else
       if (INTVAL (value) < 0)
 	ASM_OUTPUT_INT (file, constm1_rtx);
       else
 	ASM_OUTPUT_INT (file, const0_rtx);
       ASM_OUTPUT_INT (file, value);
+#endif
     }
   else if (GET_CODE (value) == CONST_DOUBLE)
     {



More information about the Gcc mailing list