This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Small Sparc64 native fix
- To: egcs at cygnus dot com
- Subject: Small Sparc64 native fix
- From: "David S. Miller" <davem at jenolan dot rutgers dot edu>
- Date: Thu, 2 Oct 1997 12:13:41 -0400
- CC: dje at cygnus dot com
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)
{