vm: fix compilation

db4
Slava Pestov 2009-10-22 06:38:02 -04:00
parent f24942e063
commit 3d5c3935ad
6 changed files with 8 additions and 8 deletions

View File

@ -10,7 +10,7 @@ void early_init();
const char *vm_executable_path(); const char *vm_executable_path();
const char *default_image_path(); const char *default_image_path();
inline static cell align_stack_pointer(cell sp) template<typename Type> Type align_stack_pointer(Type sp)
{ {
return sp; return sp;
} }

View File

@ -62,7 +62,7 @@ inline static unsigned int uap_fpu_status(void *uap)
return mach_fpu_status(UAP_FS(uap)); return mach_fpu_status(UAP_FS(uap));
} }
inline static cell align_stack_pointer(cell sp) template<typename Type> Type align_stack_pointer(Type sp)
{ {
return sp; return sp;
} }

View File

@ -64,9 +64,9 @@ inline static unsigned int uap_fpu_status(void *uap)
return mach_fpu_status(UAP_FS(uap)); return mach_fpu_status(UAP_FS(uap));
} }
inline static cell align_stack_pointer(cell sp) template<typename Type> Type align_stack_pointer(Type sp)
{ {
return ((sp + 4) & ~15) - 4; return (Type)((((cell)sp + 4) & ~15) - 4);
} }
inline static void mach_clear_fpu_status(i386_float_state_t *float_state) inline static void mach_clear_fpu_status(i386_float_state_t *float_state)

View File

@ -62,9 +62,9 @@ inline static unsigned int uap_fpu_status(void *uap)
return mach_fpu_status(UAP_FS(uap)); return mach_fpu_status(UAP_FS(uap));
} }
inline static cell align_stack_pointer(cell sp) template<typename Type> Type align_stack_pointer(Type sp)
{ {
return ((sp + 8) & ~15) - 8; return (Type)((((cell)sp + 8) & ~15) - 8);
} }
inline static void mach_clear_fpu_status(x86_float_state64_t *float_state) inline static void mach_clear_fpu_status(x86_float_state64_t *float_state)

View File

@ -127,7 +127,7 @@ void factor_vm::dispatch_signal(void *uap, void (handler)())
else else
signal_callstack_top = NULL; signal_callstack_top = NULL;
UAP_STACK_POINTER(uap) = (void *)align_stack_pointer((cell)UAP_STACK_POINTER(uap)); UAP_STACK_POINTER(uap) = align_stack_pointer(UAP_STACK_POINTER(uap));
UAP_PROGRAM_COUNTER(uap) = (cell)handler; UAP_PROGRAM_COUNTER(uap) = (cell)handler;
} }

View File

@ -694,7 +694,7 @@ struct factor_vm
LONG exception_handler(PEXCEPTION_POINTERS pe); LONG exception_handler(PEXCEPTION_POINTERS pe);
#endif #endif
#else // UNIX #else // UNIX
void factor_vm::dispatch_signal(void *uap, void (handler)()); void dispatch_signal(void *uap, void (handler)());
#endif #endif
#ifdef __APPLE__ #ifdef __APPLE__