Patchwork PATCH: PR target/45213: "suffix or operands invalid for `push'" triggered by optimisations on x86_64

login
register
mail settings
Submitter Uros Bizjak
Date Aug. 7, 2010, 10:45 a.m.
Message ID <AANLkTingydicrwCAZmzyexhjd0xjjGUHUbM7qZ5oJo_+@mail.gmail.com>
Download mbox | patch
Permalink /patch/61177/
State New
Headers show

Comments

Uros Bizjak - Aug. 7, 2010, 10:45 a.m.
On Sat, Aug 7, 2010 at 12:11 PM, Uros Bizjak <ubizjak@gmail.com> wrote:

>> "pushq $imm32S" only takes 32bit signed extended immediate. You can't push
>> 0xbf800000. Instead, you push -1082130432 or 0xffffffffbf800000.  This
>> patch makes it signed.  OK for trunk/4.5/4.4?
>
> No, see the comment in real.h:
>
> /* IN is a REAL_VALUE_TYPE.  OUT is a long.  */
> #define REAL_VALUE_TO_TARGET_SINGLE(IN, OUT) \
>  ((OUT) = real_to_target (NULL, &(IN), mode_for_size (32, MODE_FLOAT, 0)))

IMO, this is correct patch, to also generate correct extension on ILP32 hosts.


Uros.

Patch

Index: i386.c
===================================================================
--- i386.c	(revision 162975)
+++ i386.c	(working copy)
@@ -12921,7 +12921,7 @@ 

       if (ASSEMBLER_DIALECT == ASM_ATT)
 	putc ('$', file);
-      fprintf (file, "0x%08lx", (long unsigned int) l);
+      fprintf (file, "0x%08llx", (unsigned long long) (int) l);
     }

   /* These float cases don't actually occur as immediate operands.  */