Incorrect function prologue with Thumb-1 high register variable
Bug #640521 reported by
Andrew Stubbs
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Linaro GCC |
Won't Fix
|
Low
|
Michael Collison |
Bug Description
Compiling the following with "-Os -mthumb" results in the caller's r8 being incorrectly clobbered.
void foo(int x)
{
register int foo asm("r8") = x;
asm volatile ("@frob %0" :: "r"(foo);
}
GCC chooses not to use r8-r11 when optimizing Thumb-1 for size. However this should not be user-visible. Note that this is the correct behavior when the user specifies -ffixed-r8, care should be taken not the break that.
Discovered while trying to solve a different problem in eglibc.
[CodeSourcery Tracker ID #9085]
Changed in gcc-linaro: | |
status: | Confirmed → Triaged |
Changed in gcc-linaro: | |
assignee: | nobody → Michael Collison (michael-collison) |
To post a comment you must log in.
This is Thumb-1, so setting "low" importance.