Skip to content

Commit

Permalink
Merge pull request #7368 from dhalbert/preserve-nlr_push-regs
Browse files Browse the repository at this point in the history
Use returns_twice attribute to preserve regs in nlrthumb nlr_push()
  • Loading branch information
dhalbert committed Dec 21, 2022
2 parents 2a1bb72 + 8087887 commit 2f14768
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion py/nlrthumb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2f14768

Please sign in to comment.