aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/sys_linux_arm64.s
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/sys_linux_arm64.s')
-rw-r--r--src/runtime/sys_linux_arm64.s16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/runtime/sys_linux_arm64.s b/src/runtime/sys_linux_arm64.s
index 36ac014f03..8e7cbf7d11 100644
--- a/src/runtime/sys_linux_arm64.s
+++ b/src/runtime/sys_linux_arm64.s
@@ -459,10 +459,16 @@ TEXT runtime·sigtramp(SB),NOSPLIT,$176
CBZ R0, 2(PC)
BL runtime·load_g(SB)
+#ifdef GOEXPERIMENT_regabiargs
+ // Restore signum to R0.
+ MOVW 8(RSP), R0
+ // R1 and R2 already contain info and ctx, respectively.
+#else
MOVD R1, 16(RSP)
MOVD R2, 24(RSP)
- MOVD $runtime·sigtrampgo(SB), R0
- BL (R0)
+#endif
+ MOVD $runtime·sigtrampgo<ABIInternal>(SB), R3
+ BL (R3)
// Restore callee-save registers.
RESTORE_R19_TO_R28(8*4)
@@ -476,10 +482,14 @@ TEXT runtime·sigprofNonGoWrapper<>(SB),NOSPLIT,$176
SAVE_R19_TO_R28(8*4)
SAVE_F8_TO_F15(8*14)
+#ifdef GOEXPERIMENT_regabiargs
+ // R0, R1 and R2 already contain sig, info and ctx, respectively.
+#else
MOVW R0, 8(RSP) // sig
MOVD R1, 16(RSP) // info
MOVD R2, 24(RSP) // ctx
- CALL runtime·sigprofNonGo(SB)
+#endif
+ CALL runtime·sigprofNonGo<ABIInternal>(SB)
// Restore callee-save registers.
RESTORE_R19_TO_R28(8*4)