summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/system-arm.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/system-arm.h')
-rw-r--r--firmware/target/arm/system-arm.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/firmware/target/arm/system-arm.h b/firmware/target/arm/system-arm.h
index 5cacc4cf62..775b1ba1c9 100644
--- a/firmware/target/arm/system-arm.h
+++ b/firmware/target/arm/system-arm.h
@@ -97,10 +97,9 @@ static inline int set_irq_level(int level)
asm volatile (
"mrs %1, cpsr \n"
"bic %0, %1, #0x80 \n"
- "and %2, %2, #0x80 \n"
"orr %0, %0, %2 \n"
"msr cpsr_c, %0 \n"
- : "=&r"(cpsr), "=&r"(oldlevel), "+&r"(level)
+ : "=&r,r"(cpsr), "=&r,r"(oldlevel) : "r,i"(level & 0x80)
);
return oldlevel;
}