fix(verify): fix non-amd64 JIT trampolines and validate under qemu

This commit is contained in:
2026-08-31 12:34:50 +02:00
parent a5a59d6503
commit 94c4756d47
10 changed files with 77 additions and 43 deletions
+5 -2
View File
@@ -20,8 +20,11 @@ TEXT ·enterJIT(SB), NOSPLIT, $0-16
MOVD R3, savedSP(SB) // save Go stack pointer
MOVD stack+8(FP), R3 // load prepared stack pointer
MOVD 0(R3), R30 // load leaveJIT address into LR
ADD $8, R3, R3 // advance past return address
MOVD R3, RSP // switch to prepared stack
MOVD R3, RSP // switch to the prepared stack: SP stays on
// the leave slot, so the kernel reads its
// first argument at SP+8 per the frame
// convention (amd64 lays the stack out the
// same way)
JMP (R0) // branch to JIT function
// func leaveJIT()