mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 05:05:20 -05:00
Work around wonky inline asm issue with creativezenvm build.
The right thing here probably to just not bother at all, as this bootloader can't launch rockbox yet anyway. Change-Id: I62bd22353b6adc9dbe35b94f3b60a6a67348356a
This commit is contained in:
parent
105a0eb0b7
commit
19d45c9257
1 changed files with 13 additions and 1 deletions
|
|
@ -110,6 +110,18 @@ static inline int set_interrupt_status(int status, int mask)
|
||||||
unsigned long cpsr;
|
unsigned long cpsr;
|
||||||
int oldstatus;
|
int oldstatus;
|
||||||
/* Read the old levels and set the new ones */
|
/* Read the old levels and set the new ones */
|
||||||
|
#if defined(CREATIVE_ZVM) && defined(BOOTLOADER)
|
||||||
|
// FIXME: This workaround is for a problem with inlining;
|
||||||
|
// for some reason 'mask' gets treated as a variable/non-immediate constant
|
||||||
|
// but only on this build. All others (including the nearly-identical mrobe500boot) are fine
|
||||||
|
asm volatile (
|
||||||
|
"mrs %1, cpsr \n"
|
||||||
|
"bic %0, %1, %[mask] \n"
|
||||||
|
"orr %0, %0, %2 \n"
|
||||||
|
"msr cpsr_c, %0 \n"
|
||||||
|
: "=&r,r"(cpsr), "=&r,r"(oldstatus)
|
||||||
|
: "r,i"(status & mask), [mask]"r,i"(mask));
|
||||||
|
#else
|
||||||
asm volatile (
|
asm volatile (
|
||||||
"mrs %1, cpsr \n"
|
"mrs %1, cpsr \n"
|
||||||
"bic %0, %1, %[mask] \n"
|
"bic %0, %1, %[mask] \n"
|
||||||
|
|
@ -117,7 +129,7 @@ static inline int set_interrupt_status(int status, int mask)
|
||||||
"msr cpsr_c, %0 \n"
|
"msr cpsr_c, %0 \n"
|
||||||
: "=&r,r"(cpsr), "=&r,r"(oldstatus)
|
: "=&r,r"(cpsr), "=&r,r"(oldstatus)
|
||||||
: "r,i"(status & mask), [mask]"i,i"(mask));
|
: "r,i"(status & mask), [mask]"i,i"(mask));
|
||||||
|
#endif
|
||||||
return oldstatus;
|
return oldstatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue