feat(asm): encode indirect JMP and CALL on all four architectures

Assisted-by: GLM 5.3 Flash
This commit is contained in:
2026-09-19 19:17:07 +02:00
parent 96e81cc98d
commit 23c001be51
24 changed files with 494 additions and 27 deletions
+2 -2
View File
@@ -39,7 +39,7 @@ TEXT ·enterJITChecked(SB), NOSPLIT, $0-16
MOVV 0(R5), R1 // load leaveJITCheckedRaw into RA
MOVV R5, R3 // SP stays on the leave slot: the kernel
// reads its first argument at SP+8
JIRL R0, R4, 0 // jump to JIT function
JMP (R4) // jump to JIT function
// leaveJITCheckedRaw is the raw return trampoline. It has NO Go function
// declaration, so no ABIInternal wrapper is generated; the JIT function's
@@ -61,6 +61,6 @@ g_ok:
MOVV savedRA(SB), R1 // restore return address
MOVV savedG(SB), g // restore g: Go code needs it the moment it
// resumes, violation or not
JIRL R0, R1, 0 // return to Go caller
JMP (R1) // return to Go caller
GLOBL savedG(SB), NOPTR, $8