Draft: lab 3 irq wtf

This commit is contained in:
2025-03-24 10:48:35 +08:00
parent 6156975775
commit c5fc7e3102
19 changed files with 386 additions and 142 deletions

View File

@@ -43,8 +43,14 @@ void exit(int);
: [a] "=r" (ret) \
)
#define W_SYSREG(val, reg) \
#define W_SYSREG(reg, val) \
asm volatile( \
"msr " #reg ", %[a]" \
: [a] "r" (val) \
:: [a] "r" (val) \
)
#define R_REG(ret, reg) \
asm volatile( \
"mov %[a], " #reg \
: [a] "=r" (ret) \
)