sparc.c (output_double_int): Output DI mode values correctly when HOST_BITS_PER_WIDE_...
authorDoug Evans <devans@gcc.gnu.org>
Fri, 17 Oct 1997 21:59:06 +0000 (21:59 +0000)
committerDoug Evans <devans@gcc.gnu.org>
Fri, 17 Oct 1997 21:59:06 +0000 (21:59 +0000)
* sparc/sparc.c (output_double_int): Output DI mode values
correctly when HOST_BITS_PER_WIDE_INT is 64.

From-SVN: r15977

gcc/ChangeLog
gcc/config/sparc/sparc.c

index 032236c1643d7a10002e01f93d11a3df23fcc797..dfad611f4b43873ea71b4c7be46dab1cc341d74e 100644 (file)
@@ -1,9 +1,11 @@
 Fri Oct 17 17:13:42 1997  David S. Miller  <davem@tanya.rutgers.edu>
 
        * sparc/linux64.h (LINK_SPEC): Dynamic linker is ld-linux64.so.2.
-       * sparc/sparc.c (dwarf2out_cfi_label): Extern no longer needed.
        * sparc/sparc.h (FUNCTION_PROFILER): Fix format string when
        TARGET_MEDANY.
+       * sparc/sparc.c (dwarf2out_cfi_label): Extern no longer needed.
+       (output_double_int): Output DI mode values correctly when
+       HOST_BITS_PER_WIDE_INT is 64.
 
 Fri Oct 17 13:39:56 1997  Doug Evans  <dje@canuck.cygnus.com>
 
index ba02b4fde719be940ae1ee13a92ac538793fb0ba..cc4430c980a104aea17095a1a19428d958130df9 100644 (file)
@@ -4910,11 +4910,22 @@ output_double_int (file, value)
 {
   if (GET_CODE (value) == CONST_INT)
     {
+      /* ??? This has endianness issues.  */
+#if HOST_BITS_PER_WIDE_INT == 64
+      HOST_WIDE_INT xword = INTVAL (value);
+      HOST_WIDE_INT high, low;
+
+      high = (xword >> 32) & 0xffffffff;
+      low  = xword & 0xffffffff;
+      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)
     {