On Thu, Mar 24, 2011 at 8:59 PM, Rainer Orth
<r...@cebitec.uni-bielefeld.de> wrote:
> Uros Bizjak <ubiz...@gmail.com> writes:
>
>> 2011-03-23  Uros Bizjak  <ubiz...@gmail.com>
>>
>>       PR target/48237
>>       * config/i386/i386.md (*movdf_internal_rex64): Do not split
>>       alternatives that can be handled with movq or movabsq insn.
>>       (*movdf_internal): Disable for !TARGET_64BIT.
>>       (*movdf_internal_nointeger): Ditto.
>>       * config/i386/i386.c (ix86_print_operand): Handle DFmode immediates.
>
> This patch broke Solaris/x86 bootstrap:
>
> /vol/gcc/src/hg/trunk/local/gcc/config/i386/i386.c: In function 
> 'ix86_print_operand':
> /vol/gcc/src/hg/trunk/local/gcc/config/i386/i386.c:14416:2: error: format 
> '%lld' expects argument of type 'long long int', but argument 3 has type 
> 'long int' [-Werror=format]

Fixed by attached patch that removes all fancy conditional handling.

2011-03-24  Uros Bizjak  <ubiz...@gmail.com>

        * config/i386/i386.md (ix86_print_operand): Output DFmode const_double
        correctly.

Tested on x86_64-pc-linux-gnu, committed to mainline.

Uros.
>
>        Rainer
>
> --
> -----------------------------------------------------------------------------
> Rainer Orth, Center for Biotechnology, Bielefeld University
>
Index: config/i386/i386.c
===================================================================
--- config/i386/i386.c  (revision 171422)
+++ config/i386/i386.c  (working copy)
@@ -14408,12 +14408,7 @@ ix86_print_operand (FILE *file, rtx x, i
 
       if (ASSEMBLER_DIALECT == ASM_ATT)
        putc ('$', file);
-      /* We can use %d if the number is <32 bits and positive.  */
-      if (l[1] || l[0] < 0)
-       fprintf (file, "0x%lx%08lx",
-                (unsigned long) l[1], (unsigned long) l[0]);
-      else
-       fprintf (file, HOST_WIDE_INT_PRINT_DEC, l[0]);
+      fprintf (file, "0x%lx%08lx", l[1] & 0xffffffff, l[0] & 0xffffffff);
     }
 
   /* These float cases don't actually occur as immediate operands.  */

Reply via email to