This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/53040] New: nested functions may trash floating point registers
- From: "amodra at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 19 Apr 2012 11:10:11 +0000
- Subject: [Bug target/53040] New: nested functions may trash floating point registers
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53040
Bug #: 53040
Summary: nested functions may trash floating point registers
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: amodra@gmail.com
compile with -m32 -Os -fno-inline
void ws_f (void)
{
char b[10];
void ns_f (void)
{
char a[33];
__asm __volatile ("#%0 %1" : "=m" (a), "=m" (b) : : "fr28", "fr31");
}
ns_f ();
}
results in
ns_f.2345:
stwu 1,-96(1)
mflr 0
stfd 28,64(1)
stw 0,100(1)
stfd 31,88(1)
[snip]
addi 11,1,96
b _restfpr_28_x
_restfpr_28_x will restore fr29 and fr30 from uninitialised stack.