public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/45213]  New: "suffix or operands invalid for `push'" triggered by optimisations on x86_64
@ 2010-08-06 20:36 philip dot taylor at cl dot cam dot ac dot uk
  2010-08-06 20:37 ` [Bug target/45213] " philip dot taylor at cl dot cam dot ac dot uk
                   ` (7 more replies)
  0 siblings, 8 replies; 10+ messages in thread
From: philip dot taylor at cl dot cam dot ac dot uk @ 2010-08-06 20:36 UTC (permalink / raw)
  To: gcc-bugs

The attached source file gives:

  $ gcc -c t.c -Os -fno-omit-frame-pointer
  /tmp/ccAuCzVe.s: Assembler messages:
  /tmp/ccAuCzVe.s:16: Error: suffix or operands invalid for `push'

It complains on the line:

  pushq $0x3f800000

Reproduced on:

Target: x86_64-pc-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-4.5.0/work/gcc-4.5.0/configure
--prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.5.0
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.5.0
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.5.0/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.5.0/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4
--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec
--disable-fixed-point --without-ppl --without-cloog --disable-lto --enable-nls
--without-included-gettext --with-system-zlib --disable-checking
--disable-werror --enable-secureplt --enable-multilib --enable-libmudflap
--disable-libssp --enable-libgomp --enable-cld
--with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.5.0/python
--disable-libgcj --enable-languages=c,c++ --enable-shared
--enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
--with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.5.0 p1.2,
pie-0.4.5'
Thread model: posix
gcc version 4.5.0 (Gentoo 4.5.0 p1.2, pie-0.4.5)

Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--enable-checking=release --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions
--enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk
--disable-dssi --enable-plugin
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre
--enable-libgcj-multifile --enable-java-maintainer-mode
--with-ecj-jar=/usr/share/java/eclipse-ecj.jar --with-cpu=generic
--host=x86_64-redhat-linux
Thread model: posix
gcc version 4.1.2 20070925 (Red Hat 4.1.2-27)


-- 
           Summary: "suffix or operands invalid for `push'" triggered by
                    optimisations on x86_64
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: philip dot taylor at cl dot cam dot ac dot uk


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45213


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/45213] "suffix or operands invalid for `push'" triggered by optimisations on x86_64
  2010-08-06 20:36 [Bug target/45213] New: "suffix or operands invalid for `push'" triggered by optimisations on x86_64 philip dot taylor at cl dot cam dot ac dot uk
@ 2010-08-06 20:37 ` philip dot taylor at cl dot cam dot ac dot uk
  2010-08-06 20:44 ` pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: philip dot taylor at cl dot cam dot ac dot uk @ 2010-08-06 20:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from philip dot taylor at cl dot cam dot ac dot uk  2010-08-06 20:37 -------
Created an attachment (id=21426)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21426&action=view)
test case


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45213


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/45213] "suffix or operands invalid for `push'" triggered by optimisations on x86_64
  2010-08-06 20:36 [Bug target/45213] New: "suffix or operands invalid for `push'" triggered by optimisations on x86_64 philip dot taylor at cl dot cam dot ac dot uk
  2010-08-06 20:37 ` [Bug target/45213] " philip dot taylor at cl dot cam dot ac dot uk
@ 2010-08-06 20:44 ` pinskia at gcc dot gnu dot org
  2010-08-06 20:53 ` ubizjak at gmail dot com
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2010-08-06 20:44 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2010-08-06 20:44 -------
Confirmed.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
 GCC target triplet|                            |x86_64-*-*
           Keywords|                            |assemble-failure
      Known to fail|                            |4.1.2 4.3.2 4.2.2 4.6.0
   Last reconfirmed|0000-00-00 00:00:00         |2010-08-06 20:44:01
               date|                            |
            Version|unknown                     |4.5.1


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45213


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/45213] "suffix or operands invalid for `push'" triggered by optimisations on x86_64
  2010-08-06 20:36 [Bug target/45213] New: "suffix or operands invalid for `push'" triggered by optimisations on x86_64 philip dot taylor at cl dot cam dot ac dot uk
  2010-08-06 20:37 ` [Bug target/45213] " philip dot taylor at cl dot cam dot ac dot uk
  2010-08-06 20:44 ` pinskia at gcc dot gnu dot org
@ 2010-08-06 20:53 ` ubizjak at gmail dot com
  2010-08-06 21:02 ` hjl dot tools at gmail dot com
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: ubizjak at gmail dot com @ 2010-08-06 20:53 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from ubizjak at gmail dot com  2010-08-06 20:53 -------
(In reply to comment #0)

> It complains on the line:
> 
>   pushq $0x3f800000

No, it doesn't. Assembler complains on:

        pushq   $0xbf800000

Which makes this a binutils bug. Let's ask H.J.


-- 

ubizjak at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hjl dot tools at gmail dot
                   |                            |com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45213


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/45213] "suffix or operands invalid for `push'" triggered by optimisations on x86_64
  2010-08-06 20:36 [Bug target/45213] New: "suffix or operands invalid for `push'" triggered by optimisations on x86_64 philip dot taylor at cl dot cam dot ac dot uk
                   ` (2 preceding siblings ...)
  2010-08-06 20:53 ` ubizjak at gmail dot com
@ 2010-08-06 21:02 ` hjl dot tools at gmail dot com
  2010-08-06 21:51 ` hjl dot tools at gmail dot com
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-08-06 21:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from hjl dot tools at gmail dot com  2010-08-06 21:02 -------
I opened:

http://www.sourceware.org/bugzilla/show_bug.cgi?id=11893


-- 

hjl dot tools at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|                            |http://www.sourceware.org/bu
                   |                            |gzilla/show_bug.cgi?id=11893
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45213


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/45213] "suffix or operands invalid for `push'" triggered by optimisations on x86_64
  2010-08-06 20:36 [Bug target/45213] New: "suffix or operands invalid for `push'" triggered by optimisations on x86_64 philip dot taylor at cl dot cam dot ac dot uk
                   ` (3 preceding siblings ...)
  2010-08-06 21:02 ` hjl dot tools at gmail dot com
@ 2010-08-06 21:51 ` hjl dot tools at gmail dot com
  2010-08-06 22:10 ` hjl dot tools at gmail dot com
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-08-06 21:51 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from hjl dot tools at gmail dot com  2010-08-06 21:51 -------
The bug is in gcc. "pushq $imm32S" only takes 32bit signed extended
immediate. You can't push 0xbf800000. Instead, you push -1082130432
or 0xffffffffbf800000.


-- 

hjl dot tools at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|http://www.sourceware.org/bu|
                   |gzilla/show_bug.cgi?id=11893|
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45213


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/45213] "suffix or operands invalid for `push'" triggered by optimisations on x86_64
  2010-08-06 20:36 [Bug target/45213] New: "suffix or operands invalid for `push'" triggered by optimisations on x86_64 philip dot taylor at cl dot cam dot ac dot uk
                   ` (4 preceding siblings ...)
  2010-08-06 21:51 ` hjl dot tools at gmail dot com
@ 2010-08-06 22:10 ` hjl dot tools at gmail dot com
  2010-08-06 22:39 ` hjl dot tools at gmail dot com
  2010-08-07 20:32 ` uros at gcc dot gnu dot org
  7 siblings, 0 replies; 10+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-08-06 22:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from hjl dot tools at gmail dot com  2010-08-06 22:10 -------
This patch:

diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 204211a..3dfbede 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -12921,7 +12921,7 @@ ix86_print_operand (FILE *file, rtx x, int code)

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

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

works for me.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45213


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/45213] "suffix or operands invalid for `push'" triggered by optimisations on x86_64
  2010-08-06 20:36 [Bug target/45213] New: "suffix or operands invalid for `push'" triggered by optimisations on x86_64 philip dot taylor at cl dot cam dot ac dot uk
                   ` (5 preceding siblings ...)
  2010-08-06 22:10 ` hjl dot tools at gmail dot com
@ 2010-08-06 22:39 ` hjl dot tools at gmail dot com
  2010-08-07 20:32 ` uros at gcc dot gnu dot org
  7 siblings, 0 replies; 10+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-08-06 22:39 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from hjl dot tools at gmail dot com  2010-08-06 22:39 -------
A patch is posted at

http://gcc.gnu.org/ml/gcc-patches/2010-08/msg00528.html


-- 

hjl dot tools at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|                            |http://gcc.gnu.org/ml/gcc-
                   |                            |patches/2010-
                   |                            |08/msg00528.html


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45213


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/45213] "suffix or operands invalid for `push'" triggered by optimisations on x86_64
  2010-08-06 20:36 [Bug target/45213] New: "suffix or operands invalid for `push'" triggered by optimisations on x86_64 philip dot taylor at cl dot cam dot ac dot uk
                   ` (6 preceding siblings ...)
  2010-08-06 22:39 ` hjl dot tools at gmail dot com
@ 2010-08-07 20:32 ` uros at gcc dot gnu dot org
  7 siblings, 0 replies; 10+ messages in thread
From: uros at gcc dot gnu dot org @ 2010-08-07 20:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from uros at gcc dot gnu dot org  2010-08-07 20:32 -------
Subject: Bug 45213

Author: uros
Date: Sat Aug  7 20:32:30 2010
New Revision: 162983

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=162983
Log:
        PR target/45213
        * config/i386/i386.c (ix86_print_operand): Handle 'q' operand modifier
        to output 32bit SFmode immediate as 8 byte sign extended value.

testsuite/ChangeLog:

        PR target/45213
        * gcc.target/i386/pr45213.c: New test.


Added:
    trunk/gcc/testsuite/gcc.target/i386/pr45213.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/i386/i386.c
    trunk/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45213


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/45213] "suffix or operands invalid for `push'" triggered by optimisations on x86_64
       [not found] <bug-45213-4@http.gcc.gnu.org/bugzilla/>
@ 2012-03-15  8:58 ` pinskia at gcc dot gnu.org
  0 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-03-15  8:58 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45213

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.6.0

--- Comment #9 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-03-15 08:44:24 UTC ---
Fixed.


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-03-15  8:45 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-06 20:36 [Bug target/45213] New: "suffix or operands invalid for `push'" triggered by optimisations on x86_64 philip dot taylor at cl dot cam dot ac dot uk
2010-08-06 20:37 ` [Bug target/45213] " philip dot taylor at cl dot cam dot ac dot uk
2010-08-06 20:44 ` pinskia at gcc dot gnu dot org
2010-08-06 20:53 ` ubizjak at gmail dot com
2010-08-06 21:02 ` hjl dot tools at gmail dot com
2010-08-06 21:51 ` hjl dot tools at gmail dot com
2010-08-06 22:10 ` hjl dot tools at gmail dot com
2010-08-06 22:39 ` hjl dot tools at gmail dot com
2010-08-07 20:32 ` uros at gcc dot gnu dot org
     [not found] <bug-45213-4@http.gcc.gnu.org/bugzilla/>
2012-03-15  8:58 ` pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).