[Bug target/59549] New: [SH] __builtin_return_address causes push/pop of PR
olegendo at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Dec 18 18:56:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59549
Bug ID: 59549
Summary: [SH] __builtin_return_address causes push/pop of PR
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: olegendo at gcc dot gnu.org
Target: sh*-*-*
The following:
void* test (void)
{
return __builtin_return_address (0);
}
compiled with -m4 -O2 results in:
sts.l pr,@-r15
sts pr,r0
lds.l @r15+,pr
rts
nop
The push and pop of PR is not necessary, as it's only used, but not modified.
It seems that calc_live_regs in sh.c is missing something.
More information about the Gcc-bugs
mailing list