From f4f8e3703aa7808e2d65e05aa81b061f5059e4a7 Mon Sep 17 00:00:00 2001 From: Doug Evans Date: Fri, 17 Oct 1997 21:59:06 +0000 Subject: [PATCH] sparc.c (output_double_int): Output DI mode values correctly when HOST_BITS_PER_WIDE_INT is 64. * sparc/sparc.c (output_double_int): Output DI mode values correctly when HOST_BITS_PER_WIDE_INT is 64. From-SVN: r15977 --- gcc/ChangeLog | 4 +++- gcc/config/sparc/sparc.c | 11 +++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 032236c1643..dfad611f4b4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,9 +1,11 @@ Fri Oct 17 17:13:42 1997 David S. Miller * 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 diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c index ba02b4fde71..cc4430c980a 100644 --- a/gcc/config/sparc/sparc.c +++ b/gcc/config/sparc/sparc.c @@ -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) { -- 2.30.2