Update x86 for lazy JIT

release
Slava Pestov 2007-09-26 00:34:37 -04:00
parent 99a42aa089
commit 30fdd20f96
3 changed files with 14 additions and 0 deletions

View File

@ -9,6 +9,7 @@ and the callstack top is passed in EDX */
#define XT_REG %ecx
#define STACK_REG %esp
#define DS_REG %esi
#define RETURN_REG %eax
#define CELL_SIZE 4

View File

@ -5,6 +5,7 @@
#define XT_REG %rcx
#define STACK_REG %rsp
#define DS_REG %r14
#define RETURN_REG %rax
#define CELL_SIZE 8

View File

@ -51,3 +51,15 @@ DEF(FASTCALL void,primitive_execute,(void)):
DEF(FASTCALL void,throw_impl,(CELL quot, F_STACK_FRAME *rewind_to)):
mov ARG1,STACK_REG /* rewind_to */
JUMP_QUOT
DEF(FASTCALL void,lazy_jit_compile,(CELL quot)):
mov STACK_REG,ARG1 /* Save stack pointer */
push XT_REG /* Alignment */
push XT_REG
push XT_REG
call MANGLE(jit_compile)
mov RETURN_REG,ARG0 /* No-op on 32-bit */
pop XT_REG /* OK to clobber XT_REG here */
pop XT_REG
pop XT_REG
JUMP_QUOT /* Call the quotation */