Use returns_twice attribute to preserve regs in nlrthumb nlr_push()

This commit is contained in:
Dan Halbert 2022-12-20 22:18:43 -05:00
parent e9f032f468
commit 8087887afd
1 changed files with 1 additions and 1 deletions

View File

@ -36,7 +36,7 @@
// For reference, arm/thumb callee save regs are:
// r4-r11, r13=sp
__attribute__((naked)) unsigned int nlr_push(nlr_buf_t *nlr) {
__attribute__((naked, returns_twice)) unsigned int nlr_push(nlr_buf_t *nlr) {
__asm volatile (
"str r4, [r0, #12] \n" // store r4 into nlr_buf