diff --git a/basis/cpu/x86/64/bootstrap.factor b/basis/cpu/x86/64/bootstrap.factor index 8b0d53cda5..28309e7d97 100644 --- a/basis/cpu/x86/64/bootstrap.factor +++ b/basis/cpu/x86/64/bootstrap.factor @@ -21,6 +21,9 @@ IN: bootstrap.x86 : rex-length ( -- n ) 1 ; [ + ! HACK: stash vm pointer above the ds stack + temp0 0 MOV rc-absolute-cell rt-vm jit-rel + ds-reg bootstrap-cell [+] temp0 MOV ! load stack_chain temp0 0 MOV rc-absolute-cell rt-stack-chain jit-rel temp0 temp0 [] MOV diff --git a/vm/primitives.hpp b/vm/primitives.hpp index 8e6c3b8f51..5eefc19e01 100644 --- a/vm/primitives.hpp +++ b/vm/primitives.hpp @@ -13,6 +13,7 @@ namespace factor extern const primitive_type primitives[]; #define PRIMITIVE_OVERFLOW_GETVM() vm + #define VM_PTR vm #define ASSERTVM() }