public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "hjl dot tools at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/35466] New: Different assembly codes on 32bit and 64bit hosts Date: Wed, 05 Mar 2008 04:13:00 -0000 [thread overview] Message-ID: <bug-35466-682@http.gcc.gnu.org/bugzilla/> (raw) Gcc generates different 32bit assembly codes in 32bit and 64bit hosts: 1. On 64bit host, [hjl@gnu-26 stage1-gcc]$ cat x.i _Decimal128 test (void) { return 1234123412341234.123412341234dl; } [hjl@gnu-26 stage1-gcc]$ ./xgcc -B./ -msse -S -m32 -march=i386 -mtune=generic x.i [hjl@gnu-26 stage1-gcc]$ cat x.s .file "x.i" .text .globl test .type test, @function test: pushl %ebp movl %esp, %ebp movl 8(%ebp), %eax movaps .LC0, %xmm0 movaps %xmm0, (%eax) popl %ebp ret $4 .size test, .-test .section .rodata .align 16 .LC0: .long 84673010 .long 1025550150 .long 66901964 .long 807927808 .ident "GCC: (GNU) 4.4.0 20080304 (experimental) [trunk revision 132852]" .section .note.GNU-stack,"",@progbits [hjl@gnu-26 stage1-gcc]$ 2. On 32bit host, [hjl@gnu-9 stage1-gcc]$ cat x.i _Decimal128 test (void) { return 1234123412341234.123412341234dl; } [hjl@gnu-9 stage1-gcc]$ ./xgcc -B./ -msse -S -m32 -march=i386 -mtune=generic x.i [hjl@gnu-9 stage1-gcc]$ cat x.s .file "x.i" .text .globl test .type test, @function test: pushl %ebp movl %esp, %ebp subl $24, %esp movl 8(%ebp), %eax movaps .LC0, %xmm0 movaps %xmm0, -24(%ebp) movaps -24(%ebp), %xmm0 movaps %xmm0, (%eax) leave ret $4 .size test, .-test .section .rodata .align 16 .LC0: .long 84673010 .long 1025550150 .long 66901964 .long 807927808 .ident "GCC: (GNU) 4.4.0 20080304 (experimental) [trunk revision 132852]" .section .note.GNU-stack,"",@progbits [hjl@gnu-9 stage1-gcc]$ Where does "subl $24, %esp" on 32bit host come from? -- Summary: Different assembly codes on 32bit and 64bit hosts Product: gcc Version: 4.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: hjl dot tools at gmail dot com GCC target triplet: x86_64-unknown-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35466
next reply other threads:[~2008-03-05 4:13 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2008-03-05 4:13 hjl dot tools at gmail dot com [this message] 2008-03-05 4:28 ` [Bug target/35466] " hjl dot tools at gmail dot com 2008-03-05 7:40 ` steven at gcc dot gnu dot org 2008-03-05 7:50 ` pinskia at gcc dot gnu dot org 2008-03-06 9:44 ` rguenth at gcc dot gnu dot org 2008-03-06 13:33 ` jsm28 at gcc dot gnu dot org 2008-03-06 13:39 ` rguenth at gcc dot gnu dot org 2008-03-06 13:52 ` jsm28 at gcc dot gnu dot org 2009-04-07 16:52 ` info dot gnu at rt-labs dot com 2009-04-08 6:07 ` hp at gcc dot gnu dot org 2009-09-17 9:41 ` ubizjak at gmail dot com
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-35466-682@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).