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 ! Contexts
: jit-switch-context ( reg -- ) : jit-switch-context ( reg -- )
! Reset return value since its bogus right now, to avoid ! Push a bogus return address so the GC can track this frame back
! confusing the GC ! to the owner
ESP -4 [+] 0 MOV 0 CALL
! Make the new context the current one ! Make the new context the current one
ctx-reg swap MOV ctx-reg swap MOV

View File

@ -263,9 +263,9 @@ IN: bootstrap.x86
! Contexts ! Contexts
: jit-switch-context ( reg -- ) : jit-switch-context ( reg -- )
! Reset return value since its bogus right now, to avoid ! Push a bogus return address so the GC can track this frame back
! confusing the GC ! to the owner
RSP -8 [+] 0 MOV 0 CALL
! Make the new context the current one ! Make the new context the current one
ctx-reg swap MOV ctx-reg swap MOV