From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21257 invoked by alias); 5 Mar 2008 04:13:52 -0000 Received: (qmail 21167 invoked by uid 48); 5 Mar 2008 04:13:06 -0000 Date: Wed, 05 Mar 2008 04:13:00 -0000 Subject: [Bug target/35466] New: Different assembly codes on 32bit and 64bit hosts X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "hjl dot tools at gmail dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-03/txt/msg00283.txt.bz2 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