[Bug target/52828] New: powerpc -m32 -Os writes register saves below stack
amodra at gmail dot com
gcc-bugzilla@gcc.gnu.org
Mon Apr 2 02:28:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52828
Bug #: 52828
Summary: powerpc -m32 -Os writes register saves below stack
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: amodra@gmail.com
An example is gcc.c-torture/compile/20020604-1.c compiled with -m32 -g -Os
-fno-omit-frame-pointer. (The -fno-omit-frame-pointer is there just to get a
reg saved. An asm volatile reg clobber gives the same result.)
The relevant part of the prologue code looks like
lis 0,0xffff
mr 12,1
ori 0,0,32736
stw 31,-4(12)
stwux 1,1,0
.cfi_def_cfa_offset 32800
.cfi_offset 31, 32796
Notice the r31 save before the stack adjust. Another consequence of the
reordering is wrong debug/eh_frame info for r31.
More information about the Gcc-bugs
mailing list