public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug target/18759] New: [x86] using both -fomit-frame-pointer and -momit-leaf-frame-pointer enables frame pointers for non-leaf functions @ 2004-12-01 16:46 markus at oberhumer dot com 2004-12-01 23:03 ` [Bug target/18759] " giovannibajo at libero dot it ` (5 more replies) 0 siblings, 6 replies; 7+ messages in thread From: markus at oberhumer dot com @ 2004-12-01 16:46 UTC (permalink / raw) To: gcc-bugs Using both -fomit-frame-pointer and -momit-leaf-frame-pointer _enables_ frame pointers for non-leaf functions. > cat x.c int foo(void) { return 0; } int bar(void) { return foo() + 1; } > gcc-3.4 -O2 -fomit-frame-pointer -c x.c && objdump -d x.o [...] 00000010 <bar>: 10: e8 fc ff ff ff call 11 <bar+0x1> 15: 40 inc %eax 16: c3 ret [...] > gcc-3.4 -O2 -fomit-frame-pointer -momit-leaf-frame-pointer -c x.c && objdump -d x.o [...] 00000010 <bar>: 10: 55 push %ebp 11: 89 e5 mov %esp,%ebp 13: e8 fc ff ff ff call 14 <bar+0x4> 18: 5d pop %ebp 19: 40 inc %eax 1a: c3 ret [...] This check in i386.c ix86_frame_pointer_required() could be the cause: /* In override_options, TARGET_OMIT_LEAF_FRAME_POINTER turns off the frame pointer by default. Turn it back on now if we've not got a leaf function. */ if (TARGET_OMIT_LEAF_FRAME_POINTER && (!current_function_is_leaf)) return 1; -- Summary: [x86] using both -fomit-frame-pointer and -momit-leaf- frame-pointer enables frame pointers for non-leaf functions Product: gcc Version: 3.4.3 Status: UNCONFIRMED Severity: normal Priority: P2 Component: target AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: markus at oberhumer dot com CC: gcc-bugs at gcc dot gnu dot org GCC host triplet: i386-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18759 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/18759] [x86] using both -fomit-frame-pointer and -momit-leaf-frame-pointer enables frame pointers for non-leaf functions 2004-12-01 16:46 [Bug target/18759] New: [x86] using both -fomit-frame-pointer and -momit-leaf-frame-pointer enables frame pointers for non-leaf functions markus at oberhumer dot com @ 2004-12-01 23:03 ` giovannibajo at libero dot it 2004-12-02 21:19 ` cvs-commit at gcc dot gnu dot org ` (4 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: giovannibajo at libero dot it @ 2004-12-01 23:03 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From giovannibajo at libero dot it 2004-12-01 23:02 ------- Roger? -- What |Removed |Added ---------------------------------------------------------------------------- CC| |sayle at gcc dot gnu dot | |org, giovannibajo at libero | |dot it http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18759 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/18759] [x86] using both -fomit-frame-pointer and -momit-leaf-frame-pointer enables frame pointers for non-leaf functions 2004-12-01 16:46 [Bug target/18759] New: [x86] using both -fomit-frame-pointer and -momit-leaf-frame-pointer enables frame pointers for non-leaf functions markus at oberhumer dot com 2004-12-01 23:03 ` [Bug target/18759] " giovannibajo at libero dot it @ 2004-12-02 21:19 ` cvs-commit at gcc dot gnu dot org 2004-12-02 21:22 ` pinskia at gcc dot gnu dot org ` (3 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: cvs-commit at gcc dot gnu dot org @ 2004-12-02 21:19 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-12-02 21:19 ------- Subject: Bug 18759 CVSROOT: /cvs/gcc Module name: gcc Changes by: sayle@gcc.gnu.org 2004-12-02 21:19:35 Modified files: gcc : ChangeLog gcc/config/i386: i386.c Log message: PR target/18759 * config/i386/i386.c (override_options): If -fomit-frame-pointer has already been specified, ignore the -momit-leaf-frame-pointer option. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.6689&r2=2.6690 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/i386.c.diff?cvsroot=gcc&r1=1.747&r2=1.748 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18759 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/18759] [x86] using both -fomit-frame-pointer and -momit-leaf-frame-pointer enables frame pointers for non-leaf functions 2004-12-01 16:46 [Bug target/18759] New: [x86] using both -fomit-frame-pointer and -momit-leaf-frame-pointer enables frame pointers for non-leaf functions markus at oberhumer dot com 2004-12-01 23:03 ` [Bug target/18759] " giovannibajo at libero dot it 2004-12-02 21:19 ` cvs-commit at gcc dot gnu dot org @ 2004-12-02 21:22 ` pinskia at gcc dot gnu dot org 2004-12-02 21:28 ` markus at oberhumer dot com ` (2 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: pinskia at gcc dot gnu dot org @ 2004-12-02 21:22 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From pinskia at gcc dot gnu dot org 2004-12-02 21:22 ------- Fixed on the mainline. -- What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Keywords| |missed-optimization Resolution| |FIXED Target Milestone|--- |4.0.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18759 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/18759] [x86] using both -fomit-frame-pointer and -momit-leaf-frame-pointer enables frame pointers for non-leaf functions 2004-12-01 16:46 [Bug target/18759] New: [x86] using both -fomit-frame-pointer and -momit-leaf-frame-pointer enables frame pointers for non-leaf functions markus at oberhumer dot com ` (2 preceding siblings ...) 2004-12-02 21:22 ` pinskia at gcc dot gnu dot org @ 2004-12-02 21:28 ` markus at oberhumer dot com 2005-05-03 21:04 ` jsm28 at gcc dot gnu dot org 2005-05-03 21:54 ` cvs-commit at gcc dot gnu dot org 5 siblings, 0 replies; 7+ messages in thread From: markus at oberhumer dot com @ 2004-12-02 21:28 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From markus at oberhumer dot com 2004-12-02 21:28 ------- Might this be a candidate for 3.3/3.4 backporting ? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18759 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/18759] [x86] using both -fomit-frame-pointer and -momit-leaf-frame-pointer enables frame pointers for non-leaf functions 2004-12-01 16:46 [Bug target/18759] New: [x86] using both -fomit-frame-pointer and -momit-leaf-frame-pointer enables frame pointers for non-leaf functions markus at oberhumer dot com ` (3 preceding siblings ...) 2004-12-02 21:28 ` markus at oberhumer dot com @ 2005-05-03 21:04 ` jsm28 at gcc dot gnu dot org 2005-05-03 21:54 ` cvs-commit at gcc dot gnu dot org 5 siblings, 0 replies; 7+ messages in thread From: jsm28 at gcc dot gnu dot org @ 2005-05-03 21:04 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From jsm28 at gcc dot gnu dot org 2005-05-03 21:04 ------- I'm backporting this patch to csl-sol210-3_4-branch. In theory there's a regression on vanilla 3.4 if you build pr9771-1.c with -momit-leaf-frame-pointer in addition to the options specified in that testcase (then this bug causes it to fail); it's just the Solaris 10 port which isn't in vanilla 3.4 which makes this more visible by having -momit-leaf-frame-pointer on by default when optimizing. -- What |Removed |Added ---------------------------------------------------------------------------- CC| |jsm28 at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18759 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/18759] [x86] using both -fomit-frame-pointer and -momit-leaf-frame-pointer enables frame pointers for non-leaf functions 2004-12-01 16:46 [Bug target/18759] New: [x86] using both -fomit-frame-pointer and -momit-leaf-frame-pointer enables frame pointers for non-leaf functions markus at oberhumer dot com ` (4 preceding siblings ...) 2005-05-03 21:04 ` jsm28 at gcc dot gnu dot org @ 2005-05-03 21:54 ` cvs-commit at gcc dot gnu dot org 5 siblings, 0 replies; 7+ messages in thread From: cvs-commit at gcc dot gnu dot org @ 2005-05-03 21:54 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-05-03 21:54 ------- Subject: Bug 18759 CVSROOT: /cvs/gcc Module name: gcc Branch: csl-sol210-3_4-branch Changes by: jsm28@gcc.gnu.org 2005-05-03 21:54:14 Modified files: . : ChangeLog.csl gcc/config/i386: i386.c Log message: Backport from mainline: 2004-12-02 Roger Sayle <roger@eyesopen.com> PR target/18759 * config/i386/i386.c (override_options): If -fomit-frame-pointer has already been specified, ignore the -momit-leaf-frame-pointer option. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/ChangeLog.csl.diff?cvsroot=gcc&only_with_tag=csl-sol210-3_4-branch&r1=1.1.2.16&r2=1.1.2.17 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/i386.c.diff?cvsroot=gcc&only_with_tag=csl-sol210-3_4-branch&r1=1.635.2.15.2.2&r2=1.635.2.15.2.3 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18759 ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2005-05-03 21:54 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2004-12-01 16:46 [Bug target/18759] New: [x86] using both -fomit-frame-pointer and -momit-leaf-frame-pointer enables frame pointers for non-leaf functions markus at oberhumer dot com 2004-12-01 23:03 ` [Bug target/18759] " giovannibajo at libero dot it 2004-12-02 21:19 ` cvs-commit at gcc dot gnu dot org 2004-12-02 21:22 ` pinskia at gcc dot gnu dot org 2004-12-02 21:28 ` markus at oberhumer dot com 2005-05-03 21:04 ` jsm28 at gcc dot gnu dot org 2005-05-03 21:54 ` cvs-commit at gcc dot gnu dot 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).