ARM: Add external frame unwinding.

Thanks to Nick Zavaritsky.
This commit is contained in:
Mike Pall
2015-12-28 16:34:11 +01:00
parent a687a60eaa
commit f61148c486
3 changed files with 84 additions and 28 deletions

View File

@@ -372,6 +372,17 @@ static void build_subroutines(BuildCtx *ctx)
| str CARG1, [BASE, #-4] // Prepend false to error message.
| st_vmstate CARG2
| b ->vm_returnc
|
|->vm_unwind_ext: // Complete external unwind.
#if !LJ_NO_UNWIND
| push {r0, r1, r2, lr}
| bl extern _Unwind_Complete
| ldr r0, [sp]
| bl extern _Unwind_DeleteException
| pop {r0, r1, r2, lr}
| mov r0, r1
| bx r2
#endif
|
|//-----------------------------------------------------------------------
|//-- Grow stack for calls -----------------------------------------------