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/39148] New: -Os increase code size when stack is aligned Date: Tue, 10 Feb 2009 20:19:00 -0000 [thread overview] Message-ID: <bug-39148-682@http.gcc.gnu.org/bugzilla/> (raw) [hjl@gnu-6 pr39137]$ cat pr39137-3.i void foo (unsigned long long *); void bar (void) { unsigned long long l __attribute__ ((aligned(32))); foo (&l); } [hjl@gnu-6 pr39137]$ /export/build/gnu/gcc-work/build-x86_64-linux/gcc/xgcc -B/export/build/gnu/gcc-avx/build-x86_64-linux/gcc/ -m32 -Os pr39137-3.i -S [hjl@gnu-6 pr39137]$ cat pr39137-3.s .file "pr39137-3.i" .text .globl bar .type bar, @function bar: leal 4(%esp), %ecx andl $-32, %esp pushl -4(%ecx) pushl %ebp movl %esp, %ebp pushl %ecx subl $64, %esp leal -56(%ebp), %eax pushl %eax call foo movl -4(%ebp), %ecx addl $16, %esp leave leal -4(%ecx), %esp ret .size bar, .-bar [hjl@gnu-6 pr39137]$ /export/build/gnu/gcc-work/build-x86_64-linux/gcc/xgcc -B/export/build/gnu/gcc-avx/build-x86_64-linux/gcc/ -m32 -O pr39137-3.i -S [hjl@gnu-6 pr39137]$ cat pr39137-3.s .file "pr39137-3.i" .text .globl bar .type bar, @function bar: pushl %ebp movl %esp, %ebp andl $-32, %esp subl $48, %esp leal 16(%esp), %eax movl %eax, (%esp) call foo leave ret .size bar, .-bar [hjl@gnu-6 pr39137]$ -Os generates bigger binary. -- Summary: -Os increase code size when stack is aligned 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: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39148
next reply other threads:[~2009-02-10 20:19 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2009-02-10 20:19 hjl dot tools at gmail dot com [this message] 2009-02-10 20:19 ` [Bug target/39148] " hjl dot tools at gmail dot com 2009-02-10 20:46 ` hjl dot tools at gmail dot com 2009-02-11 15:54 ` hjl dot tools at gmail dot com 2009-02-11 17:12 ` jakub at gcc dot gnu dot org 2009-02-11 17:16 ` hjl dot tools at gmail dot com 2009-02-12 0:45 ` hjl dot tools at gmail dot com 2009-02-12 2:33 ` Joey dot ye at intel dot com 2009-02-12 2:37 ` hjl dot tools 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-39148-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).