mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-08 04:53:42 +00:00
313c9e31dd
Removes usage of AsmFull which required an optimization pass to remove the map parameter passed into it. This caused issues when compiling with -opt=0 where memory for the map was being allocated as an unintended side-effect of using AsmFull with no optimizations enabled.
22 lines
354 B
C
22 lines
354 B
C
#include <stdint.h>
|
|
|
|
void EnableInterrupts(uintptr_t mask) {
|
|
asm volatile(
|
|
"msr PRIMASK, %0"
|
|
:
|
|
: "r"(mask)
|
|
: "memory"
|
|
);
|
|
}
|
|
|
|
uintptr_t DisableInterrupts() {
|
|
uintptr_t mask;
|
|
asm volatile(
|
|
"mrs %0, PRIMASK\n\t"
|
|
"cpsid i"
|
|
: "=r"(mask)
|
|
:
|
|
: "memory"
|
|
);
|
|
return mask;
|
|
} |