public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/55147] New: x86: wrong code for 64-bit load
@ 2012-10-31 11:23 mans at mansr dot com
  2012-10-31 15:39 ` [Bug target/55147] " jakub at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: mans at mansr dot com @ 2012-10-31 11:23 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 55147
           Summary: x86: wrong code for 64-bit load
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: mans@mansr.com


> cat foo.c
unsigned foo(unsigned long long *p, int i)
{
    return __builtin_bswap64(p[i]);
}

> gcc-4.8.0 -m32 -O1 -S foo.c
foo:
        movl    8(%esp), %edx
        movl    4(%esp), %eax
        movl    (%eax,%edx,8), %edx
        movl    4(%eax,%edx,8), %eax
        bswap   %eax
        ret

Note the first movl overwriting the index register %edx.


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

end of thread, other threads:[~2012-11-07 10:15 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-31 11:23 [Bug target/55147] New: x86: wrong code for 64-bit load mans at mansr dot com
2012-10-31 15:39 ` [Bug target/55147] " jakub at gcc dot gnu.org
2012-10-31 15:48 ` ubizjak at gmail dot com
2012-10-31 16:07 ` jakub at gcc dot gnu.org
2012-11-01  9:27 ` [Bug target/55147] [4.8 Regression] " ubizjak at gmail dot com
2012-11-01  9:44 ` jakub at gcc dot gnu.org
2012-11-01  9:49 ` ubizjak at gmail dot com
2012-11-02  8:03 ` jakub at gcc dot gnu.org
2012-11-07 10:15 ` jakub 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).