7 #define RETURN_REG %eax
9 #define NV_TEMP_REG %ebx
11 #define ARITH_TEMP_1 %ebp
12 #define ARITH_TEMP_2 %ebx
13 #define DIV_RESULT %eax
16 #define STACK_PADDING 12
18 #define PUSH_NONVOLATILE \
23 #define POP_NONVOLATILE \
28 #define QUOT_XT_OFFSET 12
30 /* We pass a function pointer to memcpy to work around a Mac OS X
31 ABI limitation which would otherwise require us to do a bizzaro PC-relative
32 trampoline to retrieve the function address */
33 DEF(void,set_callstack,(F_STACK_FRAME *to, F_STACK_FRAME *from, CELL length, void *memcpy)):
34 mov 4(%esp),%ebp /* to */
35 mov 8(%esp),%edx /* from */
36 mov 12(%esp),%ecx /* length */
37 mov 16(%esp),%eax /* memcpy */
38 sub %ecx,%ebp /* compute new stack pointer */
40 push %ecx /* pass length */
41 push %edx /* pass src */
42 push %ebp /* pass dst */
43 call *%eax /* call memcpy */
44 add $12,%esp /* pop args from the stack */
45 ret /* return _with new stack_ */
47 /* cpu.x86.32 calls this */
48 DEF(bool,check_sse2,(void)):
58 DEF(long long,read_timestamp_counter,(void)):
62 DEF(void,primitive_inline_cache_miss,(void)):
64 DEF(void,primitive_inline_cache_miss_tail,(void)):
67 call MANGLE(inline_cache_miss)
71 DEF(void,get_sse_env,(void*)):
76 DEF(void,set_sse_env,(const void*)):
81 DEF(void,get_x87_env,(void*)):
87 DEF(void,set_x87_env,(const void*)):
101 .ascii " -export:check_sse2"
102 .ascii " -export:read_timestamp_counter"
103 .ascii " -export:get_sse_env"
104 .ascii " -export:set_sse_env"
105 .ascii " -export:get_x87_env"
106 .ascii " -export:set_x87_env"