diff --git a/vm/callstack.hpp b/vm/callstack.hpp index ae1e80ca9a..1ea98f883c 100755 --- a/vm/callstack.hpp +++ b/vm/callstack.hpp @@ -13,7 +13,7 @@ PRIMITIVE(innermost_stack_frame_executing); PRIMITIVE(innermost_stack_frame_scan); PRIMITIVE(set_innermost_stack_frame_quot); -VM_ASM_API void save_callstack_bottom(stack_frame *callstack_bottom,factor_vm *vm); +VM_ASM_API void save_callstack_bottom(stack_frame *callstack_bottom, factor_vm *vm); } diff --git a/vm/cpu-ppc.hpp b/vm/cpu-ppc.hpp index d0036fb84f..495eb375ec 100644 --- a/vm/cpu-ppc.hpp +++ b/vm/cpu-ppc.hpp @@ -3,7 +3,6 @@ namespace factor #define FACTOR_CPU_STRING "ppc" #define VM_ASM_API VM_C_API -#define VM_ASM_API_OVERFLOW VM_C_API register cell ds asm("r13"); register cell rs asm("r14"); diff --git a/vm/cpu-x86.32.S b/vm/cpu-x86.32.S index 3eeb798093..4f06de1ce7 100644 --- a/vm/cpu-x86.32.S +++ b/vm/cpu-x86.32.S @@ -82,7 +82,7 @@ DEF(void,set_x87_env,(const void*)): ret DEF(F_FASTCALL void,throw_impl,(CELL quot, F_STACK_FRAME *rewind_to, void *vm)): - mov CELL_SIZE(STACK_REG),NV_TEMP_REG /* get vm ptr in case quot_xt = lazy_jit_compile */ + mov ARG2,NV_TEMP_REG /* remember vm ptr in case quot_xt = lazy_jit_compile */ /* clear x87 stack, but preserve rounding mode and exception flags */ sub $2,STACK_REG fnstcw (STACK_REG) diff --git a/vm/cpu-x86.32.hpp b/vm/cpu-x86.32.hpp index a95179a49b..e740771470 100644 --- a/vm/cpu-x86.32.hpp +++ b/vm/cpu-x86.32.hpp @@ -6,6 +6,5 @@ namespace factor register cell ds asm("esi"); register cell rs asm("edi"); -#define VM_ASM_API VM_C_API __attribute__ ((regparm (2))) -#define VM_ASM_API_OVERFLOW VM_C_API __attribute__ ((regparm (3))) +#define VM_ASM_API VM_C_API __attribute__ ((regparm (3))) } diff --git a/vm/cpu-x86.64.hpp b/vm/cpu-x86.64.hpp index 841705c171..75d432ee13 100644 --- a/vm/cpu-x86.64.hpp +++ b/vm/cpu-x86.64.hpp @@ -7,5 +7,4 @@ register cell ds asm("r14"); register cell rs asm("r15"); #define VM_ASM_API VM_C_API -#define VM_ASM_API_OVERFLOW VM_C_API } diff --git a/vm/cpu-x86.hpp b/vm/cpu-x86.hpp index 8fe0cc4b10..9074bc1a71 100644 --- a/vm/cpu-x86.hpp +++ b/vm/cpu-x86.hpp @@ -69,7 +69,7 @@ inline static unsigned int fpu_status(unsigned int status) } /* Defined in assembly */ -VM_ASM_API void c_to_factor(cell quot,void *vm); +VM_ASM_API void c_to_factor(cell quot, void *vm); VM_ASM_API void throw_impl(cell quot, stack_frame *rewind_to, void *vm); VM_ASM_API void lazy_jit_compile(cell quot, void *vm); diff --git a/vm/math.cpp b/vm/math.cpp index 61ec096c59..638d9fa85c 100755 --- a/vm/math.cpp +++ b/vm/math.cpp @@ -838,7 +838,7 @@ inline void factor_vm::overflow_fixnum_add(fixnum x, fixnum y) untag_fixnum(x) + untag_fixnum(y)))); } -VM_ASM_API_OVERFLOW void overflow_fixnum_add(fixnum x, fixnum y, factor_vm *myvm) +VM_ASM_API void overflow_fixnum_add(fixnum x, fixnum y, factor_vm *myvm) { PRIMITIVE_OVERFLOW_GETVM()->overflow_fixnum_add(x,y); } @@ -849,7 +849,7 @@ inline void factor_vm::overflow_fixnum_subtract(fixnum x, fixnum y) untag_fixnum(x) - untag_fixnum(y)))); } -VM_ASM_API_OVERFLOW void overflow_fixnum_subtract(fixnum x, fixnum y, factor_vm *myvm) +VM_ASM_API void overflow_fixnum_subtract(fixnum x, fixnum y, factor_vm *myvm) { PRIMITIVE_OVERFLOW_GETVM()->overflow_fixnum_subtract(x,y); } @@ -863,7 +863,7 @@ inline void factor_vm::overflow_fixnum_multiply(fixnum x, fixnum y) drepl(tag(bignum_multiply(bx,by))); } -VM_ASM_API_OVERFLOW void overflow_fixnum_multiply(fixnum x, fixnum y, factor_vm *myvm) +VM_ASM_API void overflow_fixnum_multiply(fixnum x, fixnum y, factor_vm *myvm) { PRIMITIVE_OVERFLOW_GETVM()->overflow_fixnum_multiply(x,y); } diff --git a/vm/math.hpp b/vm/math.hpp index a82a9a9580..f81de37650 100644 --- a/vm/math.hpp +++ b/vm/math.hpp @@ -83,8 +83,8 @@ VM_C_API u64 to_unsigned_8(cell obj, factor_vm *vm); VM_C_API fixnum to_fixnum(cell tagged, factor_vm *vm); VM_C_API cell to_cell(cell tagged, factor_vm *vm); -VM_ASM_API_OVERFLOW void overflow_fixnum_add(fixnum x, fixnum y, factor_vm *vm); -VM_ASM_API_OVERFLOW void overflow_fixnum_subtract(fixnum x, fixnum y, factor_vm *vm); -VM_ASM_API_OVERFLOW void overflow_fixnum_multiply(fixnum x, fixnum y, factor_vm *vm); +VM_ASM_API void overflow_fixnum_add(fixnum x, fixnum y, factor_vm *vm); +VM_ASM_API void overflow_fixnum_subtract(fixnum x, fixnum y, factor_vm *vm); +VM_ASM_API void overflow_fixnum_multiply(fixnum x, fixnum y, factor_vm *vm); } diff --git a/vm/quotations.cpp b/vm/quotations.cpp index e5a2a53f86..1bc6240481 100755 --- a/vm/quotations.cpp +++ b/vm/quotations.cpp @@ -368,7 +368,7 @@ cell factor_vm::lazy_jit_compile_impl(cell quot_, stack_frame *stack) return quot.value(); } -VM_ASM_API_OVERFLOW cell lazy_jit_compile_impl(cell quot_, stack_frame *stack, factor_vm *myvm) +VM_ASM_API cell lazy_jit_compile_impl(cell quot_, stack_frame *stack, factor_vm *myvm) { ASSERTVM(); return VM_PTR->lazy_jit_compile_impl(quot_,stack); diff --git a/vm/quotations.hpp b/vm/quotations.hpp index 43beb05112..b21884a35b 100755 --- a/vm/quotations.hpp +++ b/vm/quotations.hpp @@ -27,7 +27,7 @@ PRIMITIVE(jit_compile); PRIMITIVE(array_to_quotation); PRIMITIVE(quotation_xt); -VM_ASM_API_OVERFLOW cell lazy_jit_compile_impl(cell quot, stack_frame *stack, factor_vm *myvm); +VM_ASM_API cell lazy_jit_compile_impl(cell quot, stack_frame *stack, factor_vm *myvm); PRIMITIVE(quot_compiled_p);