public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/54857] New: Superfluous NOPs on Atom
@ 2012-10-08 15:44 piotr.wyderski at gmail dot com
  2012-10-08 18:52 ` [Bug other/54857] " pinskia at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: piotr.wyderski at gmail dot com @ 2012-10-08 15:44 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 54857
           Summary: Superfluous NOPs on Atom
    Classification: Unclassified
           Product: gcc
           Version: 4.7.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: piotr.wyderski@gmail.com


GCC [4.7.1 on Linux and 4.6.1 on Cygwin] generates a LOT of unnecessary
NOPs when the target is Atom. The following testcase shows the odd behaviour:

int func(float f) { return (int)f; };

The output is:

gcc -S -O2 -march=atom -mtune=atom test.cpp 

.LFB0:
    .cfi_startproc
    cvttss2si    %xmm0, %eax
    nop
    nop
    nop
    nop
    nop
    nop
    ret
    .cfi_endproc 

When the target is e.g. Core2:

gcc -S -O2 -march=core2 -mtune=core2 test.cpp

it is simply:

.LFB0:
    .cfi_startproc
    cvttss2si    %xmm0, %eax
    ret
    .cfi_endproc 


gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/mnt/local/a3d.gcc-4.7.1/libexec/gcc/x86_64-unknown-linux-gnu/4.7.1/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-4.7.1/configure --prefix=/mnt/local/a3d.gcc-4.7.1
--with-gmp=/mnt/local/a3d.gcc-4.7.1/gcc-prerequisites
--with-mpfr=/mnt/local/a3d.gcc-4.7.1/gcc-prerequisites
--with-mpc=/mnt/local/a3d.gcc-4.7.1/gcc-prerequisites
--with-ppl=/mnt/local/a3d.gcc-4.7.1/gcc-prerequisites
--with-cloog=/mnt/local/a3d.gcc-4.7.1/gcc-prerequisites
--with-local-prefix=/mnt/local/a3d.gcc-4.7.1 --enable-languages=c,c++
--disable-multilib
Thread model: posix
gcc version 4.7.1 (GCC)


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

* [Bug other/54857] Superfluous NOPs on Atom
  2012-10-08 15:44 [Bug other/54857] New: Superfluous NOPs on Atom piotr.wyderski at gmail dot com
@ 2012-10-08 18:52 ` pinskia at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-10-08 18:52 UTC (permalink / raw)
  To: gcc-bugs


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-10-08 18:50:47 UTC ---
This was done by design for Atom see
http://gcc.gnu.org/ml/gcc-patches/2010-09/msg01104.html :
On Atom, the function return address isn't ready until 4 cycles after
function is entered.


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

end of thread, other threads:[~2012-10-08 18:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-08 15:44 [Bug other/54857] New: Superfluous NOPs on Atom piotr.wyderski at gmail dot com
2012-10-08 18:52 ` [Bug other/54857] " 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).