]> gitweb.factorcode.org Git - factor.git/commitdiff
fix lazy_jit_compile to not abuse stack on x86.32
authorPhil Dawes <phil@phildawes.net>
Thu, 24 Sep 2009 18:59:37 +0000 (19:59 +0100)
committerPhil Dawes <phil@phildawes.net>
Thu, 24 Sep 2009 18:59:37 +0000 (19:59 +0100)
vm/cpu-x86.32.S
vm/quotations.cpp
vm/quotations.hpp

index 3a5907cc78cafe6b8c80ce436459a603f089cc7b..3eeb7980933ee2b809770a1c175b0e780ed0edbc 100644 (file)
@@ -94,12 +94,10 @@ DEF(F_FASTCALL void,throw_impl,(CELL quot, F_STACK_FRAME *rewind_to, void *vm)):
        jmp *QUOT_XT_OFFSET(ARG0)
 
 DEF(F_FASTCALL void,lazy_jit_compile,(CELL quot, void *vm)):
-       mov ARG1,NV_TEMP_REG         /* stash vm ptr */
+       mov ARG1,ARG2
        mov STACK_REG,ARG1           /* Save stack pointer */
        sub $STACK_PADDING,STACK_REG
-       push NV_TEMP_REG             /* push vm ptr as arg3 */
        call MANGLE(lazy_jit_compile_impl)
-       pop NV_TEMP_REG
        mov RETURN_REG,ARG0          /* No-op on 32-bit */
        add $STACK_PADDING,STACK_REG
     jmp *QUOT_XT_OFFSET(ARG0)    /* Call the quotation */
index 1bc6240481bbe16db90f2e129558b59b57a82fa8..e5a2a53f86ef1a0e33d517ee543d9ae4afe339ee 100755 (executable)
@@ -368,7 +368,7 @@ cell factor_vm::lazy_jit_compile_impl(cell quot_, stack_frame *stack)
        return quot.value();
 }
 
-VM_ASM_API cell lazy_jit_compile_impl(cell quot_, stack_frame *stack, factor_vm *myvm)
+VM_ASM_API_OVERFLOW cell lazy_jit_compile_impl(cell quot_, stack_frame *stack, factor_vm *myvm)
 {
        ASSERTVM();
        return VM_PTR->lazy_jit_compile_impl(quot_,stack);
index b21884a35bfc8c4601f6c538e20421fd6bf09537..43beb0511276b025927a664e3862b4efbe47511d 100755 (executable)
@@ -27,7 +27,7 @@ PRIMITIVE(jit_compile);
 PRIMITIVE(array_to_quotation);
 PRIMITIVE(quotation_xt);
 
-VM_ASM_API cell lazy_jit_compile_impl(cell quot, stack_frame *stack, factor_vm *myvm);
+VM_ASM_API_OVERFLOW cell lazy_jit_compile_impl(cell quot, stack_frame *stack, factor_vm *myvm);
 
 PRIMITIVE(quot_compiled_p);