public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug regression/29248] New: Stack pointer is modified in functions that don't use the stack
@ 2006-09-27 3:19 atgraham at gmail dot com
2006-09-27 3:26 ` [Bug middle-end/29248] " pinskia at gcc dot gnu dot org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: atgraham at gmail dot com @ 2006-09-27 3:19 UTC (permalink / raw)
To: gcc-bugs
Consider the following two functions:
int foo() { return 1; }
void bar() {}
Disassembly when compiled with gcc 2.95.2: (-Os)
00000000 <foo(void)>:
0: 38 60 00 01 li r3,1
4: 4e 80 00 20 blr
00000008 <bar(void)>:
8: 4e 80 00 20 blr
Disassembly when compiled with gcc 4.1.1: (-Os)
00000000 <foo()>:
0: 94 21 ff f0 stwu r1,-16(r1)
4: 38 60 00 01 li r3,1
8: 38 21 00 10 addi r1,r1,16
c: 4e 80 00 20 blr
00000010 <bar()>:
10: 94 21 ff f0 stwu r1,-16(r1)
14: 38 21 00 10 addi r1,r1,16
18: 4e 80 00 20 blr
--
Summary: Stack pointer is modified in functions that don't use
the stack
Product: gcc
Version: 4.1.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: regression
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: atgraham at gmail dot com
GCC host triplet: i686
GCC target triplet: powerpc-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29248
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/29248] Stack pointer is modified in functions that don't use the stack
2006-09-27 3:19 [Bug regression/29248] New: Stack pointer is modified in functions that don't use the stack atgraham at gmail dot com
@ 2006-09-27 3:26 ` pinskia at gcc dot gnu dot org
2006-09-27 3:59 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-09-27 3:26 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2006-09-27 03:26 -------
How did you configure 4.1.1?
I bet this is really a dup of bug 28966.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
Component|regression |middle-end
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29248
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/29248] Stack pointer is modified in functions that don't use the stack
2006-09-27 3:19 [Bug regression/29248] New: Stack pointer is modified in functions that don't use the stack atgraham at gmail dot com
2006-09-27 3:26 ` [Bug middle-end/29248] " pinskia at gcc dot gnu dot org
@ 2006-09-27 3:59 ` pinskia at gcc dot gnu dot org
2006-09-27 4:28 ` [Bug regression/29248] " atgraham at gmail dot com
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-09-27 3:59 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2006-09-27 03:59 -------
This works for me on the mainline:
[pinskia@celery gcc]$ ./cc1 -m32 -Os t.c -o - -quiet
.file "t.c"
.section ".text"
.align 2
.globl foo
.type foo, @function
foo:
li 3,1
blr
.size foo,.-foo
.align 2
.globl bar
.type bar, @function
bar:
blr
.size bar,.-bar
.ident "GCC: (GNU) 4.2.0 20060909 (experimental)"
.section .note.GNU-stack,"",@progbits
Are you sure you did not add -maltivec somewhere or --with-cpu=970 ?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29248
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug regression/29248] Stack pointer is modified in functions that don't use the stack
2006-09-27 3:19 [Bug regression/29248] New: Stack pointer is modified in functions that don't use the stack atgraham at gmail dot com
2006-09-27 3:26 ` [Bug middle-end/29248] " pinskia at gcc dot gnu dot org
2006-09-27 3:59 ` pinskia at gcc dot gnu dot org
@ 2006-09-27 4:28 ` atgraham at gmail dot com
2006-09-27 4:42 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: atgraham at gmail dot com @ 2006-09-27 4:28 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from atgraham at gmail dot com 2006-09-27 04:28 -------
Ack! Sorry--I had indicated the wrong target on that one. The target is
vxworks, not linux. My 4.1.1 powerpc-linux compiler *does* get this
optimization right. So something in the vxworks-specific code is causing this:
/opt/vxppc/libexec/gcc/powerpc-wrs-vxworks/4.1.1> ./cc1 -m32 -Os ~/foo.c -o -
-quiet
.file "foo.c"
.section ".text"
.align 2
.globl foo
.type foo, @function
foo:
stwu 1,-16(1)
li 3,1
addi 1,1,16
blr
.size foo, .-foo
.align 2
.globl bar
.type bar, @function
bar:
stwu 1,-16(1)
addi 1,1,16
blr
.size bar, .-bar
.ident "GCC: (GNU) 4.1.1"
In my opinion, this is a very low priority problem, despite that this is one of
my primary development environments. Sorry for wasting your time with the
wrong target.
--
atgraham at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|middle-end |regression
GCC target triplet|powerpc-linux |powerpc-wrs-vxworks
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29248
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug regression/29248] Stack pointer is modified in functions that don't use the stack
2006-09-27 3:19 [Bug regression/29248] New: Stack pointer is modified in functions that don't use the stack atgraham at gmail dot com
` (2 preceding siblings ...)
2006-09-27 4:28 ` [Bug regression/29248] " atgraham at gmail dot com
@ 2006-09-27 4:42 ` pinskia at gcc dot gnu dot org
2006-09-27 5:14 ` [Bug target/29248] " pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-09-27 4:42 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from pinskia at gcc dot gnu dot org 2006-09-27 04:42 -------
Can you give the output of gcc -v for powerpc-wrs-vxworks? I bet vxworks
enables altivec by default which means it is a dup still.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29248
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/29248] Stack pointer is modified in functions that don't use the stack
2006-09-27 3:19 [Bug regression/29248] New: Stack pointer is modified in functions that don't use the stack atgraham at gmail dot com
` (3 preceding siblings ...)
2006-09-27 4:42 ` pinskia at gcc dot gnu dot org
@ 2006-09-27 5:14 ` pinskia at gcc dot gnu dot org
2006-12-18 18:37 ` nathan at gcc dot gnu dot org
2007-10-31 19:49 ` pthaugen at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-09-27 5:14 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from pinskia at gcc dot gnu dot org 2006-09-27 05:14 -------
#define STACK_BOUNDARY (16*BITS_PER_UNIT)
This is a target issue.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |NEW
Component|regression |target
Ever Confirmed|0 |1
Known to work|2.95.2 |
Last reconfirmed|0000-00-00 00:00:00 |2006-09-27 05:14:43
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29248
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/29248] Stack pointer is modified in functions that don't use the stack
2006-09-27 3:19 [Bug regression/29248] New: Stack pointer is modified in functions that don't use the stack atgraham at gmail dot com
` (4 preceding siblings ...)
2006-09-27 5:14 ` [Bug target/29248] " pinskia at gcc dot gnu dot org
@ 2006-12-18 18:37 ` nathan at gcc dot gnu dot org
2007-10-31 19:49 ` pthaugen at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: nathan at gcc dot gnu dot org @ 2006-12-18 18:37 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from nathan at gcc dot gnu dot org 2006-12-18 18:36 -------
this is really a duplicate of 28966. Like vxworks has an unconditional 128 bit
stack alignment, unlike other targets where it is only 128bit when altivec
comes into play.
*** This bug has been marked as a duplicate of 28966 ***
--
nathan at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29248
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/29248] Stack pointer is modified in functions that don't use the stack
2006-09-27 3:19 [Bug regression/29248] New: Stack pointer is modified in functions that don't use the stack atgraham at gmail dot com
` (5 preceding siblings ...)
2006-12-18 18:37 ` nathan at gcc dot gnu dot org
@ 2007-10-31 19:49 ` pthaugen at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: pthaugen at gcc dot gnu dot org @ 2007-10-31 19:49 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from pthaugen at gcc dot gnu dot org 2007-10-31 19:48 -------
Subject: Bug 29248
Author: pthaugen
Date: Wed Oct 31 19:48:19 2007
New Revision: 129806
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=129806
Log:
2007-10-01 Pat Haugen <pthaugen@us.ibm.com>
Backport the following patches:
2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
* config/rs6000/rs6000.c (rs6000_stack_info): Allocate space for the
GOT pointer only if there is a constant pool. Use the allocated space
for SPE also.
2006-12-21 Nathan Sidwell <nathan@codesourcery.com>
PR target/28966
PR target/29248
* reload1.c (reload): Realign stack after it changes size.
Modified:
branches/ibm/gcc-4_1-branch/gcc/ChangeLog
branches/ibm/gcc-4_1-branch/gcc/config/rs6000/rs6000.c
branches/ibm/gcc-4_1-branch/gcc/reload1.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29248
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2007-10-31 19:49 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-27 3:19 [Bug regression/29248] New: Stack pointer is modified in functions that don't use the stack atgraham at gmail dot com
2006-09-27 3:26 ` [Bug middle-end/29248] " pinskia at gcc dot gnu dot org
2006-09-27 3:59 ` pinskia at gcc dot gnu dot org
2006-09-27 4:28 ` [Bug regression/29248] " atgraham at gmail dot com
2006-09-27 4:42 ` pinskia at gcc dot gnu dot org
2006-09-27 5:14 ` [Bug target/29248] " pinskia at gcc dot gnu dot org
2006-12-18 18:37 ` nathan at gcc dot gnu dot org
2007-10-31 19:49 ` pthaugen 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).