Merge pull request #7368 from dhalbert/preserve-nlr_push-regs

Use returns_twice attribute to preserve regs in nlrthumb nlr_push()
This commit is contained in:
Dan Halbert 2022-12-21 08:40:05 -05:00 committed by GitHub
commit 2f1476874a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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