inline-cache-miss primitive now jumps to the new stub

db4
Slava Pestov 2009-04-28 16:58:38 -05:00
parent 3985b18026
commit e8008af5d0
3 changed files with 17 additions and 4 deletions

View File

@ -30,6 +30,7 @@ and the callstack top is passed in EDX */
pop %ebx pop %ebx
#define QUOT_XT_OFFSET 14 #define QUOT_XT_OFFSET 14
#define WORD_XT_OFFSET 30
/* We pass a function pointer to memcpy 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 ABI limitation which would otherwise require us to do a bizzaro PC-relative
@ -59,6 +60,14 @@ DEF(bool,check_sse2,(void)):
mov %edx,%eax mov %edx,%eax
ret ret
DEF(F_FASTCALL void,primitive_inline_cache_miss,(void)):
mov (%esp),%eax
sub $8,%esp
push %eax
call MANGLE(inline_cache_miss)
add $12,%esp
jmp *WORD_XT_OFFSET(%eax)
#include "cpu-x86.S" #include "cpu-x86.S"
#ifdef WINDOWS #ifdef WINDOWS

View File

@ -62,6 +62,7 @@
#endif #endif
#define QUOT_XT_OFFSET 34 #define QUOT_XT_OFFSET 34
#define WORD_XT_OFFSET 66
/* We pass a function pointer to memcpy 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 ABI limitation which would otherwise require us to do a bizzaro PC-relative
@ -72,4 +73,11 @@ DEF(void,set_callstack,(F_STACK_FRAME *to, F_STACK_FRAME *from, CELL length, voi
call *ARG3 /* call memcpy */ call *ARG3 /* call memcpy */
ret /* return _with new stack_ */ ret /* return _with new stack_ */
DEF(F_FASTCALL void,primitive_inline_cache_miss,(void)):
mov (%rsp),ARG0
sub $STACK_PADDING,%rsp
call MANGLE(inline_cache_miss)
add $STACK_PADDING,%rsp
jmp *WORD_XT_OFFSET(%rax)
#include "cpu-x86.S" #include "cpu-x86.S"

View File

@ -68,10 +68,6 @@ DEF(F_FASTCALL void,lazy_jit_compile,(CELL quot)):
add $STACK_PADDING,STACK_REG add $STACK_PADDING,STACK_REG
jmp *QUOT_XT_OFFSET(ARG0) /* Call the quotation */ jmp *QUOT_XT_OFFSET(ARG0) /* Call the quotation */
DEF(F_FASTCALL void,primitive_inline_cache_miss,(void)):
mov (STACK_REG),ARG0
jmp MANGLE(inline_cache_miss)
#ifdef WINDOWS #ifdef WINDOWS
.section .drectve .section .drectve
.ascii " -export:c_to_factor" .ascii " -export:c_to_factor"