cpu.*.bootstrap: return address for (set-context)
Instead of pushing zero as the fake return address for a set-context call, push an address that points back into the primitive so that callstack walking can match the frame back to the subprimitive.db4
parent
1911905c6b
commit
ee656387ea
|
@ -294,9 +294,9 @@ IN: bootstrap.x86
|
|||
|
||||
! Contexts
|
||||
: jit-switch-context ( reg -- )
|
||||
! Reset return value since its bogus right now, to avoid
|
||||
! confusing the GC
|
||||
ESP -4 [+] 0 MOV
|
||||
! Push a bogus return address so the GC can track this frame back
|
||||
! to the owner
|
||||
0 CALL
|
||||
|
||||
! Make the new context the current one
|
||||
ctx-reg swap MOV
|
||||
|
|
|
@ -263,9 +263,9 @@ IN: bootstrap.x86
|
|||
|
||||
! Contexts
|
||||
: jit-switch-context ( reg -- )
|
||||
! Reset return value since its bogus right now, to avoid
|
||||
! confusing the GC
|
||||
RSP -8 [+] 0 MOV
|
||||
! Push a bogus return address so the GC can track this frame back
|
||||
! to the owner
|
||||
0 CALL
|
||||
|
||||
! Make the new context the current one
|
||||
ctx-reg swap MOV
|
||||
|
|
Loading…
Reference in New Issue