x86-64 fixes

release
Slava Pestov 2007-09-22 02:28:49 -04:00
parent 2589c69c04
commit 136e249f6d
7 changed files with 8 additions and 4 deletions

View File

@ -32,7 +32,7 @@ IN: bootstrap.image
: -1-offset 9 ; inline
: array-start 2 bootstrap-cells object tag-number - ;
: scan@ array-start 4 - ;
: scan@ array-start bootstrap-cell - ;
: wrapper@ bootstrap-cell object tag-number - ;
: word-xt@ 8 bootstrap-cells object tag-number - ;
: quot-array@ bootstrap-cell object tag-number - ;

View File

@ -13,5 +13,6 @@ IN: bootstrap.x86
: scan-reg EBX ;
: xt-reg ECX ;
: fixnum>slot@ arg0 1 SAR ;
: next-frame@ -44 ;
"resource:core/cpu/x86/bootstrap.factor" run-file

View File

@ -13,6 +13,8 @@ PREDICATE: x86-backend amd64-backend
M: amd64-backend ds-reg R14 ;
M: amd64-backend rs-reg R15 ;
M: amd64-backend stack-reg RSP ;
M: x86-backend xt-reg RCX ;
M: x86-backend stack-save-reg RSI ;
M: temp-reg v>operand drop R13 ;

View File

@ -13,5 +13,6 @@ IN: bootstrap.x86
: scan-reg RBX ;
: xt-reg RCX ;
: fixnum>slot@ ;
: next-frame@ -88 ;
"resource:core/cpu/x86/bootstrap.factor" run-file

View File

@ -17,7 +17,7 @@ big-endian off
[
xt-reg PUSH ! save XT
xt-reg stack-reg -44 [+] LEA ! compute forward chain pointer
xt-reg stack-reg next-frame@ [+] LEA ! compute forward chain pointer
xt-reg PUSH ! save forward chain pointer
arg0 PUSH ! save array
stack-reg 4 bootstrap-cells SUB ! reserve space for scan-save

View File

@ -25,7 +25,7 @@ and the callstack top is passed in EDX */
#define WORD_DEF_OFFSET 13
#define WORD_XT_OFFSET 29
/* We pass a function pointer to memcpy in 16(%esp) to work around a Mac OS X
/* We pass a function pointer to memcpy to work around a Mac OS X
ABI limitation which would otherwise require us to do a bizzaro PC-relative
trampoline to retrieve the function address */
DEF(void,set_callstack,(F_STACK_FRAME *to, F_STACK_FRAME *from, CELL length, void *memcpy)):

View File

@ -25,7 +25,7 @@
#define WORD_DEF_OFFSET 29
#define WORD_XT_OFFSET 61
/* We pass a function pointer to memcpy in 16(%esp) to work around a Mac OS X
/* We pass a function pointer to memcpy to work around a Mac OS X
ABI limitation which would otherwise require us to do a bizzaro PC-relative
trampoline to retrieve the function address */
DEF(void,set_callstack,(F_STACK_FRAME *to, F_STACK_FRAME *from, CELL length, void *memcpy)):