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
Joe Groff 2011-11-30 12:52:06 -08:00
parent 1911905c6b
commit ee656387ea
2 changed files with 6 additions and 6 deletions

View File

@ -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

View File

@ -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