public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/29473]  New: -masm=intel combined with -march=athlon64 has some issues.
@ 2006-10-14 21:38 nachms+gcc at gmail dot com
  2006-10-14 21:43 ` [Bug c++/29473] " nachms+gcc at gmail dot com
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: nachms+gcc at gmail dot com @ 2006-10-14 21:38 UTC (permalink / raw)
  To: gcc-bugs

Here is my test case:

unsigned char Keep4_3Ratio;
unsigned long SMode=0, DSMode=0;

bool CheckTVRatioReq()
{
  return(Keep4_3Ratio && (DSMode == 1 || SMode == 1));
}

Compiling on an x86-32 compiler with the following:
g++ -march=athlon64 -masm=intel -O3 -fomit-frame-pointer -o test.o -c test.cpp
Causes the compile to fail with:
Assembler messages: Error: expecting string instruction after `rep'

The assembly being:
_Z15CheckTVRatioReqv:
.LFB2:
        xor     %eax, %eax
        cmp     BYTE PTR Keep4_3Ratio, 0
        je      .L4
        cmp     DWORD PTR DSMode, 1
        mov     %al, 1
        je      .L4
        xor     %eax, %eax
        cmp     DWORD PTR SMode, 1
        sete    %al
.L4:
        rep  ret

"rep ret" is an invalid instruction.
I've tested with the following 32 bit compilers:

Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu
--enable-libstdcxx-debug --enable-mpfr --with-tune=i686
--enable-checking=release i486-linux-gnu
Thread model: posix
gcc version 4.1.2 20060928 (prerelease) (Debian 4.1.1-15)

Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,java,fortran,objc,obj-c++,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--program-suffix=-4.2 --enable-__cxa_atexit --enable-clocale=gnu
--enable-libstdcxx-debug --enable-java-awt=gtk-default,qt-default
--enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-4.2-1.4.2.0/jre
--enable-objc-gc --enable-mpfr --with-tune=generic --enable-checking=release
i486-linux-gnu
Thread model: posix
gcc version 4.2.0 20060709 (experimental) (Debian 4.2-20060709-1)

Using built-in specs.
Target: i586-msdosdjgpp
Configured with: ./configure --target=i586-msdosdjgpp --prefix=/usr
--disable-nls --enable-languages=c,c++
--with-headers=/usr/i586-msdosdjgpp/sys-include
Thread model: single
gcc version 4.1.0

Reading specs from /usr/i586-mingw32/lib/gcc/i586-mingw32/3.4.5/specs
Configured with: ../configure --prefix=/usr/i586-mingw32 --with-gcc
--with-gnu-ld --with-gnu-as --target=i586-mingw32 --enable-threads
--disable-nls --enable-languages=c,c++,f77,ada,objc,java
--disable-win32-registry --disable-shared --enable-sjlj-exceptions
--enable-libgcj --disable-java-awt --without-x --enable-java-gc=boehm
--disable-libgcj-debug --enable-interpreter --enable-hash-synchronization
--disable-libstdcxx-debug
Thread model: win32
gcc version 3.4.5 (mingw special)

Reading specs from ../lib/gcc/mingw32/3.4.5/specs
Configured with: ../gcc-3.4.5/configure --with-gcc --with-gnu-ld --with-gnu-as
--host=mingw32 --target=mingw32 --prefix=/mingw --enable-threads --disable-nls
--enable-languages=c,c++,f77,ada,objc,java --disable-win32-registry
--disable-shared --enable-sjlj-exceptions --enable-libgcj --disable-java-awt
--without-x --enable-java-gc=boehm --disable-libgcj-debug --enable-interpreter
--enable-hash-synchronization --enable-libstdcxx-debug
Thread model: win32
gcc version 3.4.5 (mingw special)

Using built-in specs.
Target: djgpp
Configured with: /gnu/gcc-4.10/configure djgpp --prefix=/dev/env/DJDIR
--disable-nls --disable-werror
--enable-languages=c,c++,fortran,objc,obj-c++,ada
Thread model: single
gcc version 4.1.0

Interestingly enough, it did not fail when using this version of GCC:
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --enable-languages=c,c++,java
--prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--program-suffix=-4.0 --enable-__cxa_atexit --enable-clocale=gnu
--enable-libstdcxx-debug --enable-java-awt=gtk-default --enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.4.2-gcj-4.0-1.4.2.0/jre --with-tune=i686
--enable-checking=release i486-linux-gnu
Thread model: posix
gcc version 4.0.4 20060904 (prerelease) (Debian 4.0.3-7)

Although I suspect if I played with the options more I can get it to fail with
that GCC too.


Now when using the same case with an x86-64 compile and the following options:

g++ -march=athlon64 -masm=intel -o test.o -c test.cpp

I get the following errors:
Assembler messages:
Error: invalid operand for 'movzx' ('(' unexpected)
Error: invalid operand for 'mov' ('(' unexpected)
Error: invalid operand for 'mov' ('(' unexpected)

Assembly being:
_Z15CheckTVRatioReqv:
.LFB2:
        push    %rbp
.LCFI0:
        mov     %rbp, %rsp
.LCFI1:
        movzx   %eax, BYTE PTR Keep4_3Ratio(%rip)
        test    %al, %al
        je      .L2
        mov     %rax, QWORD PTR DSMode(%rip)
        cmp     %rax, 1
        je      .L4
        mov     %rax, QWORD PTR SMode(%rip)
        cmp     %rax, 1
        jne     .L2
.L4:
        mov     BYTE PTR [%rbp-1], 1
        jmp     .L6
.L2:
        mov     BYTE PTR [%rbp-1], 0
.L6:
        movzx   %eax, BYTE PTR [%rbp-1]
        leave
        ret

I don't know AMD64 assembly well but "Keep4_3Ratio(%rip)" and the like doesn't
look right to me.

If I add -O3 so the line becomes:

g++ -O3 -march=athlon64 -masm=intel -o test.o -c test.cpp

I get "cmp" bugs instead of "mov" and I also get the "rep ret" bug from above
when using GCC 4.1 (but not 4.0).

My 64 bit compilers:

Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --enable-languages=c,c++,java
--prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--program-suffix=-4.0 --enable-__cxa_atexit --enable-clocale=gnu
--enable-libstdcxx-debug --enable-java-awt=gtk --enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.4.2-gcj-4.0-1.4.2.0/jre
--enable-checking=release x86_64-linux-gnu
Thread model: posix
gcc version 4.0.4 20060904 (prerelease) (Debian 4.0.3-7)

Target: x86_64-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu
--enable-libstdcxx-debug --enable-mpfr --enable-checking=release
x86_64-linux-gnu
Thread model: posix
gcc version 4.1.2 20060928 (prerelease) (Debian 4.1.1-15)

I've conducted this test on two different PCs, one running WinXP SP2, and the
other Debian Unstable.


-- 
           Summary: -masm=intel combined with -march=athlon64 has some
                    issues.
           Product: gcc
           Version: 4.1.2
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: nachms+gcc at gmail dot com


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


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

* [Bug c++/29473] -masm=intel combined with -march=athlon64 has some issues.
  2006-10-14 21:38 [Bug c++/29473] New: -masm=intel combined with -march=athlon64 has some issues nachms+gcc at gmail dot com
@ 2006-10-14 21:43 ` nachms+gcc at gmail dot com
  2006-10-14 21:51 ` nachms+gcc at gmail dot com
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: nachms+gcc at gmail dot com @ 2006-10-14 21:43 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from nachms+gcc at gmail dot com  2006-10-14 21:43 -------
Oh I just realized one statement of mine was ambiguous.

>I get "cmp" bugs instead of "mov" and I also get the "rep ret" bug from above
when using GCC 4.1 (but not 4.0).

I mean to say that when using a 64 bit GCC 4.0, I do not get that "rep ret" bug
even with -O3, but I still get errors such as: "Error: invalid operand for
'cmp' ('(' unexpected)"

-Nach


-- 


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


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

* [Bug c++/29473] -masm=intel combined with -march=athlon64 has some issues.
  2006-10-14 21:38 [Bug c++/29473] New: -masm=intel combined with -march=athlon64 has some issues nachms+gcc at gmail dot com
  2006-10-14 21:43 ` [Bug c++/29473] " nachms+gcc at gmail dot com
@ 2006-10-14 21:51 ` nachms+gcc at gmail dot com
  2006-10-14 21:56 ` deathlike_2 at hotmail dot com
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: nachms+gcc at gmail dot com @ 2006-10-14 21:51 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from nachms+gcc at gmail dot com  2006-10-14 21:51 -------
Oh another thing.

If I change
  return(Keep4_3Ratio && (DSMode == 1 || SMode == 1));

to:
  return((DSMode == 1 || SMode == 1) && Keep4_3Ratio);

The "rep ret" problem in the 32 bit compilers go away for some strange reason.
However when doing this, the assembly outputted seems very messy and
unoptimized to me.

-Nach


-- 


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


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

* [Bug c++/29473] -masm=intel combined with -march=athlon64 has some issues.
  2006-10-14 21:38 [Bug c++/29473] New: -masm=intel combined with -march=athlon64 has some issues nachms+gcc at gmail dot com
  2006-10-14 21:43 ` [Bug c++/29473] " nachms+gcc at gmail dot com
  2006-10-14 21:51 ` nachms+gcc at gmail dot com
@ 2006-10-14 21:56 ` deathlike_2 at hotmail dot com
  2007-02-27  0:22 ` [Bug target/29473] " pinskia at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: deathlike_2 at hotmail dot com @ 2006-10-14 21:56 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from deathlike_2 at hotmail dot com  2006-10-14 21:56 -------
I am experiencing the same issue. Compiling under MinGW and DJGPP generates the
same error message:

Assembler messages: Error: expecting string instruction after `rep'

Removing the parameter -O3 or -fomit-frame-pointer won't generate the errors.
-O3 can be substituted with -O1 and still generate the error.


-- 


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


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

* [Bug target/29473] -masm=intel combined with -march=athlon64 has some issues.
  2006-10-14 21:38 [Bug c++/29473] New: -masm=intel combined with -march=athlon64 has some issues nachms+gcc at gmail dot com
                   ` (2 preceding siblings ...)
  2006-10-14 21:56 ` deathlike_2 at hotmail dot com
@ 2007-02-27  0:22 ` pinskia at gcc dot gnu dot org
  2007-02-27  0:23 ` pinskia at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-02-27  0:22 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from pinskia at gcc dot gnu dot org  2007-02-27 00:22 -------
*** Bug 30976 has been marked as a duplicate of this bug. ***


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |zsojka at seznam dot cz


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


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

* [Bug target/29473] -masm=intel combined with -march=athlon64 has some issues.
  2006-10-14 21:38 [Bug c++/29473] New: -masm=intel combined with -march=athlon64 has some issues nachms+gcc at gmail dot com
                   ` (3 preceding siblings ...)
  2007-02-27  0:22 ` [Bug target/29473] " pinskia at gcc dot gnu dot org
@ 2007-02-27  0:23 ` pinskia at gcc dot gnu dot org
  2007-05-20  9:46 ` nachms+gcc at gmail dot com
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-02-27  0:23 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|major                       |normal


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


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

* [Bug target/29473] -masm=intel combined with -march=athlon64 has some issues.
  2006-10-14 21:38 [Bug c++/29473] New: -masm=intel combined with -march=athlon64 has some issues nachms+gcc at gmail dot com
                   ` (4 preceding siblings ...)
  2007-02-27  0:23 ` pinskia at gcc dot gnu dot org
@ 2007-05-20  9:46 ` nachms+gcc at gmail dot com
  2007-05-20  9:48 ` pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: nachms+gcc at gmail dot com @ 2007-05-20  9:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from nachms+gcc at gmail dot com  2007-05-20 10:46 -------
I just tested against:
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--with-gxx-include-dir=/usr/include/c++/4.2 --program-suffix=-4.2
--enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug
--enable-mpfr --disable-werror --enable-checking=release
--build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.2.1 20070516 (prerelease) (Debian 4.2-20070516-1)

This problem still exists.


-- 

nachms+gcc at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |major
            Version|4.1.2                       |4.2.1


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


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

* [Bug target/29473] -masm=intel combined with -march=athlon64 has some issues.
  2006-10-14 21:38 [Bug c++/29473] New: -masm=intel combined with -march=athlon64 has some issues nachms+gcc at gmail dot com
                   ` (5 preceding siblings ...)
  2007-05-20  9:46 ` nachms+gcc at gmail dot com
@ 2007-05-20  9:48 ` pinskia at gcc dot gnu dot org
  2007-08-08 17:23 ` tapani at chalmers dot se
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-05-20  9:48 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|major                       |normal


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


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

* [Bug target/29473] -masm=intel combined with -march=athlon64 has some issues.
  2006-10-14 21:38 [Bug c++/29473] New: -masm=intel combined with -march=athlon64 has some issues nachms+gcc at gmail dot com
                   ` (6 preceding siblings ...)
  2007-05-20  9:48 ` pinskia at gcc dot gnu dot org
@ 2007-08-08 17:23 ` tapani at chalmers dot se
  2007-09-12 13:12 ` rask at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: tapani at chalmers dot se @ 2007-08-08 17:23 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from tapani at chalmers dot se  2007-08-08 17:23 -------

The "rep ret" bug is not athlon64 specific. 

I have a similar bug where gcc-4.2.1 generates several "rep ret" instructions,
without me using -march=athlon64. In my case, it seems to be triggered by a
combination of "-masm=intel", "-O" and "-fomit-frame-pointer".

I am using a vanilla gcc 4.2.1, on a plain GNU/Linux IA32 (Pentium 4 CPU, so
really nothing to do with athlon64 or x86_64).

//Tapani


-- 

tapani at chalmers dot se changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tapani at chalmers dot se


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


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

* [Bug target/29473] -masm=intel combined with -march=athlon64 has some issues.
  2006-10-14 21:38 [Bug c++/29473] New: -masm=intel combined with -march=athlon64 has some issues nachms+gcc at gmail dot com
                   ` (7 preceding siblings ...)
  2007-08-08 17:23 ` tapani at chalmers dot se
@ 2007-09-12 13:12 ` rask at gcc dot gnu dot org
  2007-09-12 13:41 ` ubizjak at gmail dot com
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: rask at gcc dot gnu dot org @ 2007-09-12 13:12 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from rask at gcc dot gnu dot org  2007-09-12 13:12 -------
This still happens with GCC 4.3 when trying to bootstrap with BOOT_CFLAGS='-O2
-g -fomit-frame-pointer -masm=intel' and it blocks me from working on bug
29493.

/home/rask/build/gcc-x86_64-unknown-linux-gnu/./prev-gcc/xgcc
-B/home/rask/build/gcc-x86_64-unknown-linux-gnu/./prev-gcc/
-B/usr/local/x86_64-unknown-linux-gnu/bin/ -c -DHAVE_CONFIG_H -O2 -g
-fomit-frame-pointer -masm=intel -I. -I/home/rask/src/gcc/libiberty/../include 
-W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic 
/home/rask/src/gcc/libiberty/cplus-dem.c -o cplus-dem.o
/tmp/cc74KiHp.s: Assembler messages:
/tmp/cc74KiHp.s:818: Error: expecting string instruction after `rep'
make[3]: *** [cplus-dem.o] Error 1
make[3]: Leaving directory
`/home/rask/build/gcc-x86_64-unknown-linux-gnu/libiberty'
make[2]: *** [all-stage2-libiberty] Error 2

I have already found and fixed the cause of the other error message:
Error: invalid operand for 'movzx' ('(' unexpected)
It's caused by the AT&T syntax (%rip) in the asm output.


-- 

rask at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
OtherBugsDependingO|                            |29493
              nThis|                            |
         AssignedTo|unassigned at gcc dot gnu   |rask at gcc dot gnu dot org
                   |dot org                     |
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
      Known to fail|                            |4.3.0
   Last reconfirmed|0000-00-00 00:00:00         |2007-09-12 13:12:21
               date|                            |


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


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

* [Bug target/29473] -masm=intel combined with -march=athlon64 has some issues.
  2006-10-14 21:38 [Bug c++/29473] New: -masm=intel combined with -march=athlon64 has some issues nachms+gcc at gmail dot com
                   ` (8 preceding siblings ...)
  2007-09-12 13:12 ` rask at gcc dot gnu dot org
@ 2007-09-12 13:41 ` ubizjak at gmail dot com
  2007-09-14 10:15 ` rask at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: ubizjak at gmail dot com @ 2007-09-12 13:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from ubizjak at gmail dot com  2007-09-12 13:41 -------
(In reply to comment #9)
> This still happens with GCC 4.3 when trying to bootstrap with BOOT_CFLAGS='-O2
> -g -fomit-frame-pointer -masm=intel' and it blocks me from working on bug
> 29493.
> 
> /home/rask/build/gcc-x86_64-unknown-linux-gnu/./prev-gcc/xgcc
> -B/home/rask/build/gcc-x86_64-unknown-linux-gnu/./prev-gcc/
> -B/usr/local/x86_64-unknown-linux-gnu/bin/ -c -DHAVE_CONFIG_H -O2 -g
> -fomit-frame-pointer -masm=intel -I. -I/home/rask/src/gcc/libiberty/../include 
> -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic 
> /home/rask/src/gcc/libiberty/cplus-dem.c -o cplus-dem.o
> /tmp/cc74KiHp.s: Assembler messages:
> /tmp/cc74KiHp.s:818: Error: expecting string instruction after `rep'
> make[3]: *** [cplus-dem.o] Error 1
> make[3]: Leaving directory
> `/home/rask/build/gcc-x86_64-unknown-linux-gnu/libiberty'
> make[2]: *** [all-stage2-libiberty] Error 2

You could play a bit with line 14997 ""rep{\;| }ret" in config/i386/i386.md:

--cut here--
;; Used by x86_machine_dependent_reorg to avoid penalty on single byte RET
;; instruction Athlon and K8 have.

(define_insn "return_internal_long"
  [(return)
   (unspec [(const_int 0)] UNSPEC_REP)]
  "reload_completed"
  "rep{\;| }ret"
  [(set_attr "length" "1")
   (set_attr "length_immediate" "0")
   (set_attr "prefix_rep" "1")
   (set_attr "modrm" "0")])
--cht here--

You could try "rep ret", "rep\;ret" or "rep ; ret" here. Otherwise, this is an
assembler bug.


-- 


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


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

* [Bug target/29473] -masm=intel combined with -march=athlon64 has some issues.
  2006-10-14 21:38 [Bug c++/29473] New: -masm=intel combined with -march=athlon64 has some issues nachms+gcc at gmail dot com
                   ` (9 preceding siblings ...)
  2007-09-12 13:41 ` ubizjak at gmail dot com
@ 2007-09-14 10:15 ` rask at gcc dot gnu dot org
  2007-10-22 11:51 ` rask at gcc dot gnu dot org
  2007-10-22 13:06 ` rask at gcc dot gnu dot org
  12 siblings, 0 replies; 14+ messages in thread
From: rask at gcc dot gnu dot org @ 2007-09-14 10:15 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from rask at gcc dot gnu dot org  2007-09-14 10:15 -------
Yes, that worked.
It is quite obvious from trying a bootstrap with -masm=intel that nobody ever
uses Intel syntax, because there are assorted issues around the edges.
Additionally, I'm now blocked by binutils bug gas/5034.
http://sourceware.org/bugzilla/show_bug.cgi?id=5034


-- 


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


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

* [Bug target/29473] -masm=intel combined with -march=athlon64 has some issues.
  2006-10-14 21:38 [Bug c++/29473] New: -masm=intel combined with -march=athlon64 has some issues nachms+gcc at gmail dot com
                   ` (10 preceding siblings ...)
  2007-09-14 10:15 ` rask at gcc dot gnu dot org
@ 2007-10-22 11:51 ` rask at gcc dot gnu dot org
  2007-10-22 13:06 ` rask at gcc dot gnu dot org
  12 siblings, 0 replies; 14+ messages in thread
From: rask at gcc dot gnu dot org @ 2007-10-22 11:51 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from rask at gcc dot gnu dot org  2007-10-22 11:51 -------
Subject: Bug 29473

Author: rask
Date: Mon Oct 22 11:50:56 2007
New Revision: 129548

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=129548
Log:
        PR target/29473
        PR target/29493
        * config/i386/i386.c (output_pic_addr_const): Support Intel asm syntax.
        (print_reg): Print register prefix only with AT&T asm syntax. 
        Support pc_rtx for RIP register.
        (print_operand_address): Use print_reg()'s pc_rtx support for RIP
        relative addressing.  Always print segment register prefix with AT&T
        asm syntax and never with Intel asm syntax.
        (print_operand): Suppress 'XXX PTR' prefix for BLKmode operands. 
        Fix prefix for 16-byte XFmode operands.
        (output_addr_const_extra): Support Intel asm syntax.
        (x86_file_start): Don't use register prefix with Intel asm syntax.
        * config/i386/i386.md ("*zero_extendqihi2_movzbl"): Fix typo.
        ("return_internal_long"): Fix Intel asm syntax output.
        ("set_got_rex64"): Support Intel asm syntax.
        ("set_rip_rex64"): Likewise.
        ("set_got_offset_rex64"): Likewise.
        ("*sibcall_1_rex64_v"): Print register prefix only with AT&T asm
        syntax.
        ("*tls_global_dynamic_64"): Likewise.
        ("*tls_local_dynamic_base_64"): Likewise.
        ("*load_tp_si")("*load_tp_di"): Likewise.
        ("*add_tp_si")("*add_tp_di"): Likewise.
        ("*tls_dynamic_lea_64"): Likewise.
        ("*sibcall_value_1_rex64_v"): Likewise.
        ("stack_tls_protect_set_si"): Likewise.
        ("stack_tls_protect_set_di"): Likewise.
        ("stack_tls_protect_test_si"): Likewise.
        ("stack_tls_protect_test_di"): Likewise.
        * config/i386/mmx.md ("*mov<mode>_internal_rex64"): Fix Intel asm
        syntax output.
        ("*movv2sf_internal_rex64"): Likewise.
        * config/i386/cpuid.h (__cpuid): Support Intel asm syntax.
        (__get_cpuid_max): Likewise.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/i386/cpuid.h
    trunk/gcc/config/i386/i386.c
    trunk/gcc/config/i386/i386.md
    trunk/gcc/config/i386/mmx.md


-- 


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


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

* [Bug target/29473] -masm=intel combined with -march=athlon64 has some issues.
  2006-10-14 21:38 [Bug c++/29473] New: -masm=intel combined with -march=athlon64 has some issues nachms+gcc at gmail dot com
                   ` (11 preceding siblings ...)
  2007-10-22 11:51 ` rask at gcc dot gnu dot org
@ 2007-10-22 13:06 ` rask at gcc dot gnu dot org
  12 siblings, 0 replies; 14+ messages in thread
From: rask at gcc dot gnu dot org @ 2007-10-22 13:06 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from rask at gcc dot gnu dot org  2007-10-22 13:06 -------
Fixed as of revision 129548.


-- 

rask at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


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


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

end of thread, other threads:[~2007-10-22 13:06 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-14 21:38 [Bug c++/29473] New: -masm=intel combined with -march=athlon64 has some issues nachms+gcc at gmail dot com
2006-10-14 21:43 ` [Bug c++/29473] " nachms+gcc at gmail dot com
2006-10-14 21:51 ` nachms+gcc at gmail dot com
2006-10-14 21:56 ` deathlike_2 at hotmail dot com
2007-02-27  0:22 ` [Bug target/29473] " pinskia at gcc dot gnu dot org
2007-02-27  0:23 ` pinskia at gcc dot gnu dot org
2007-05-20  9:46 ` nachms+gcc at gmail dot com
2007-05-20  9:48 ` pinskia at gcc dot gnu dot org
2007-08-08 17:23 ` tapani at chalmers dot se
2007-09-12 13:12 ` rask at gcc dot gnu dot org
2007-09-12 13:41 ` ubizjak at gmail dot com
2007-09-14 10:15 ` rask at gcc dot gnu dot org
2007-10-22 11:51 ` rask at gcc dot gnu dot org
2007-10-22 13:06 ` rask at gcc dot gnu dot 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).