arm64: Implement setjmp/longjmp.
Change-Id: I9cd2d5de27a3b110b185c658e980428fe49392b0 Reviewed-on: https://review.haiku-os.org/c/haiku/+/5267 Tested-by: Commit checker robot <[email protected]> Reviewed-by: David Karoly <[email protected]> Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
@@ -11,9 +11,17 @@
|
|||||||
FUNCTION(siglongjmp):
|
FUNCTION(siglongjmp):
|
||||||
FUNCTION(longjmp):
|
FUNCTION(longjmp):
|
||||||
FUNCTION(_longjmp):
|
FUNCTION(_longjmp):
|
||||||
/* Loop infinitely here, for now.
|
ldp x19, x20, [x0], #16
|
||||||
TODO implement this for real */
|
ldp x21, x22, [x0], #16
|
||||||
b .
|
ldp x23, x24, [x0], #16
|
||||||
|
ldp x25, x26, [x0], #16
|
||||||
|
ldp x27, x28, [x0], #16
|
||||||
|
ldp x29, x30, [x0], #16
|
||||||
|
|
||||||
|
ldr x2, [x0]
|
||||||
|
mov sp, x2
|
||||||
|
|
||||||
|
b __longjmp_return
|
||||||
FUNCTION_END(siglongjmp)
|
FUNCTION_END(siglongjmp)
|
||||||
FUNCTION_END(longjmp)
|
FUNCTION_END(longjmp)
|
||||||
FUNCTION_END(_longjmp)
|
FUNCTION_END(_longjmp)
|
||||||
|
|||||||
@@ -8,7 +8,17 @@
|
|||||||
/* int sigsetjmp(jmp_buf buffer, int saveMask) */
|
/* int sigsetjmp(jmp_buf buffer, int saveMask) */
|
||||||
FUNCTION(__sigsetjmp):
|
FUNCTION(__sigsetjmp):
|
||||||
FUNCTION(sigsetjmp):
|
FUNCTION(sigsetjmp):
|
||||||
b .
|
stp x19, x20, [x0], #16
|
||||||
|
stp x21, x22, [x0], #16
|
||||||
|
stp x23, x24, [x0], #16
|
||||||
|
stp x25, x26, [x0], #16
|
||||||
|
stp x27, x28, [x0], #16
|
||||||
|
stp x29, x30, [x0], #16
|
||||||
|
|
||||||
|
mov x2, sp
|
||||||
|
str x2, [x0]
|
||||||
|
|
||||||
|
b __setjmp_save_sigs
|
||||||
FUNCTION_END(sigsetjmp)
|
FUNCTION_END(sigsetjmp)
|
||||||
FUNCTION_END(__sigsetjmp)
|
FUNCTION_END(__sigsetjmp)
|
||||||
|
|
||||||
@@ -16,7 +26,9 @@ FUNCTION_END(__sigsetjmp)
|
|||||||
/* int setjmp(jmp_buf buffer) */
|
/* int setjmp(jmp_buf buffer) */
|
||||||
FUNCTION(setjmp):
|
FUNCTION(setjmp):
|
||||||
FUNCTION(_setjmp):
|
FUNCTION(_setjmp):
|
||||||
b .
|
mov x1, #0
|
||||||
|
b __sigsetjmp
|
||||||
|
FUNCTION_END(_setjmp)
|
||||||
FUNCTION_END(setjmp)
|
FUNCTION_END(setjmp)
|
||||||
|
|
||||||
#pragma weak _setjmp=setjmp
|
#pragma weak _setjmp=setjmp
|
||||||
|
|||||||
Reference in New Issue
Block a user