Update x86 for lazy JIT
parent
99a42aa089
commit
30fdd20f96
|
@ -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
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#define XT_REG %rcx
|
||||
#define STACK_REG %rsp
|
||||
#define DS_REG %r14
|
||||
#define RETURN_REG %rax
|
||||
|
||||
#define CELL_SIZE 8
|
||||
|
||||
|
|
12
vm/cpu-x86.S
12
vm/cpu-x86.S
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue