cpu.x86.32: fix 32-bit bootstrap
parent
0e0efbd24a
commit
b346cbd6b0
|
@ -292,6 +292,15 @@ IN: bootstrap.x86
|
||||||
|
|
||||||
[ jit-set-context ] \ (set-context) define-sub-primitive
|
[ jit-set-context ] \ (set-context) define-sub-primitive
|
||||||
|
|
||||||
|
: jit-save-quot-and-param ( -- )
|
||||||
|
EDX ds-reg MOV
|
||||||
|
ds-reg 8 SUB ;
|
||||||
|
|
||||||
|
: jit-push-param ( -- )
|
||||||
|
EAX EDX -4 [+] MOV
|
||||||
|
ds-reg 4 ADD
|
||||||
|
ds-reg [] EAX MOV ;
|
||||||
|
|
||||||
: jit-start-context ( -- )
|
: jit-start-context ( -- )
|
||||||
! Create the new context in return-reg
|
! Create the new context in return-reg
|
||||||
jit-load-vm
|
jit-load-vm
|
||||||
|
@ -299,17 +308,12 @@ IN: bootstrap.x86
|
||||||
ESP [] vm-reg MOV
|
ESP [] vm-reg MOV
|
||||||
"new_context" jit-call
|
"new_context" jit-call
|
||||||
|
|
||||||
! Save pointer to quotation and parameter
|
jit-save-quot-and-param
|
||||||
EDX ds-reg MOV
|
|
||||||
ds-reg 8 SUB
|
|
||||||
|
|
||||||
! Make the new context active
|
! Make the new context active
|
||||||
EAX jit-switch-context
|
EAX jit-switch-context
|
||||||
|
|
||||||
! Push parameter
|
jit-push-param
|
||||||
EAX EDX -4 [+] MOV
|
|
||||||
ds-reg 4 ADD
|
|
||||||
ds-reg [] EAX MOV
|
|
||||||
|
|
||||||
! Windows-specific setup
|
! Windows-specific setup
|
||||||
jit-install-seh
|
jit-install-seh
|
||||||
|
@ -342,9 +346,11 @@ IN: bootstrap.x86
|
||||||
ESP 4 [+] ctx-reg MOV
|
ESP 4 [+] ctx-reg MOV
|
||||||
"reset_context" jit-call
|
"reset_context" jit-call
|
||||||
|
|
||||||
jit-pop-quot-and-param
|
jit-save-quot-and-param
|
||||||
ctx-reg jit-switch-context
|
ctx-reg jit-switch-context
|
||||||
jit-push-param
|
jit-push-param
|
||||||
|
|
||||||
|
EAX EDX [] MOV
|
||||||
jit-jump-quot ;
|
jit-jump-quot ;
|
||||||
|
|
||||||
[
|
[
|
||||||
|
|
Loading…
Reference in New Issue