fix(verify): fix non-amd64 JIT trampolines and validate under qemu
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user