vm: fix compilation
parent
f24942e063
commit
3d5c3935ad
|
@ -10,7 +10,7 @@ void early_init();
|
|||
const char *vm_executable_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;
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ inline static unsigned int uap_fpu_status(void *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;
|
||||
}
|
||||
|
|
|
@ -64,9 +64,9 @@ inline static unsigned int uap_fpu_status(void *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)
|
||||
|
|
|
@ -62,9 +62,9 @@ inline static unsigned int uap_fpu_status(void *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)
|
||||
|
|
|
@ -127,7 +127,7 @@ void factor_vm::dispatch_signal(void *uap, void (handler)())
|
|||
else
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue