From 44d2d8672eb492c7d2c406936ac0b63494b4e387 Mon Sep 17 00:00:00 2001 From: Phil Dawes Date: Tue, 25 Aug 2009 06:59:26 +0100 Subject: [PATCH] Primitives now pass vm ptr on 64bit x86 --- basis/cpu/x86/64/bootstrap.factor | 3 +++ vm/primitives.hpp | 1 + 2 files changed, 4 insertions(+) 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() }