Updates for Intel Mac
parent
dac4a5598c
commit
8c022cced5
Binary file not shown.
7
vm/asm.h
7
vm/asm.h
|
@ -1,8 +1,13 @@
|
|||
#if defined(__APPLE__) || (defined(WINDOWS) && !defined(__arm__))
|
||||
#define MANGLE(sym) _##sym
|
||||
#define XX @
|
||||
#else
|
||||
#define MANGLE(sym) sym
|
||||
#endif
|
||||
|
||||
/* Apple's PPC assembler is out of date? */
|
||||
#if defined(__APPLE__) && defined(FACTOR_PPC)
|
||||
#define XX @
|
||||
#else
|
||||
#define XX ;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -46,6 +46,3 @@ typedef struct _F_STACK_FRAME {
|
|||
#define MACH_STACK_POINTER(thr_state) (thr_state)->r1
|
||||
#define MACH_PROGRAM_COUNTER(thr_state) (thr_state)->srr0
|
||||
#endif
|
||||
|
||||
#define UAP_PROGRAM_COUNTER(ucontext) \
|
||||
MACH_PROGRAM_COUNTER(&(((ucontext_t *)(ucontext))->uc_mcontext->ss))
|
||||
|
|
|
@ -6,23 +6,11 @@
|
|||
#define MACH_THREAD_STATE_COUNT i386_THREAD_STATE_COUNT
|
||||
|
||||
#if __DARWIN_UNIX03
|
||||
#define MACH_EXC_STATE_FAULT(exc_state) (exc_state).__faultvaddr
|
||||
#define MACH_STACK_POINTER(thr_state) (thr_state).__esp
|
||||
#define MACH_PROGRAM_COUNTER(thr_state) (thr_state).__eip
|
||||
#define MACH_EXC_STATE_FAULT(exc_state) (exc_state)->__faultvaddr
|
||||
#define MACH_STACK_POINTER(thr_state) (thr_state)->__esp
|
||||
#define MACH_PROGRAM_COUNTER(thr_state) (thr_state)->__eip
|
||||
#else
|
||||
#define MACH_EXC_STATE_FAULT(exc_state) (exc_state).faultvaddr
|
||||
#define MACH_STACK_POINTER(thr_state) (thr_state).esp
|
||||
#define MACH_PROGRAM_COUNTER(thr_state) (thr_state).eip
|
||||
#define MACH_EXC_STATE_FAULT(exc_state) (exc_state)->faultvaddr
|
||||
#define MACH_STACK_POINTER(thr_state) (thr_state)->esp
|
||||
#define MACH_PROGRAM_COUNTER(thr_state) (thr_state)->eip
|
||||
#endif
|
||||
|
||||
/* Adjust stack pointer so we can push an arg */
|
||||
INLINE unsigned long fix_stack_ptr(unsigned long sp)
|
||||
{
|
||||
return sp - (sp & 0xf);
|
||||
}
|
||||
|
||||
INLINE void pass_arg0(MACH_THREAD_STATE_TYPE *thr_state, CELL arg)
|
||||
{
|
||||
*(CELL *)MACH_STACK_POINTER(*thr_state) = arg;
|
||||
MACH_STACK_POINTER(*thr_state) -= CELLS;
|
||||
}
|
||||
|
|
|
@ -11,3 +11,6 @@ const char *vm_executable_path(void);
|
|||
const char *default_image_path(void);
|
||||
|
||||
DLLEXPORT void c_to_factor_toplevel(CELL quot);
|
||||
|
||||
#define UAP_PROGRAM_COUNTER(ucontext) \
|
||||
MACH_PROGRAM_COUNTER(&(((ucontext_t *)(ucontext))->uc_mcontext->ss))
|
||||
|
|
Loading…
Reference in New Issue