3 /* Note that primitive word definitions are compiled with
4 __attribute__((regparm 2), so the pointer to the word object is passed in EAX,
5 and the callstack top is passed in EDX */
11 #define RETURN_REG %eax
13 #define NV_TEMP_REG %ebx
15 #define ARITH_TEMP_1 %ebp
16 #define ARITH_TEMP_2 %ebx
17 #define DIV_RESULT %eax
20 #define STACK_PADDING 12
22 #define PUSH_NONVOLATILE \
27 #define POP_NONVOLATILE \
32 #define QUOT_XT_OFFSET 9
34 /* We pass a function pointer to memcpy to work around a Mac OS X
35 ABI limitation which would otherwise require us to do a bizzaro PC-relative
36 trampoline to retrieve the function address */
37 DEF(void,set_callstack,(F_STACK_FRAME *to, F_STACK_FRAME *from, CELL length, void *memcpy)):
38 mov 4(%esp),%ebp /* to */
39 mov 8(%esp),%edx /* from */
40 mov 12(%esp),%ecx /* length */
41 mov 16(%esp),%eax /* memcpy */
42 sub %ecx,%ebp /* compute new stack pointer */
44 push %ecx /* pass length */
45 push %edx /* pass src */
46 push %ebp /* pass dst */
47 call *%eax /* call memcpy */
48 add $12,%esp /* pop args from the stack */
49 ret /* return _with new stack_ */
51 /* cpu.x86.32 calls this */
52 DEF(bool,check_sse2,(void)):
66 .ascii " -export:check_sse2"