vm: fix indentation in Joe's changes
parent
0cadfcd7eb
commit
83c992173e
|
@ -13,23 +13,30 @@ inline static void *ucontext_stack_pointer(void *uap)
|
|||
inline static unsigned int uap_fpu_status(void *uap)
|
||||
{
|
||||
ucontext_t *ucontext = (ucontext_t *)uap;
|
||||
if (ucontext->uc_mcontext.mc_fpformat == _MC_FPFMT_387) {
|
||||
if (ucontext->uc_mcontext.mc_fpformat == _MC_FPFMT_387)
|
||||
{
|
||||
struct save87 *x87 = (struct save87 *)(&ucontext->uc_mcontext.mc_fpstate);
|
||||
return x87->sv_env.en_sw;
|
||||
} else if (ucontext->uc_mcontext.mc_fpformat == _MC_FPFMT_XMM) {
|
||||
}
|
||||
else if (ucontext->uc_mcontext.mc_fpformat == _MC_FPFMT_XMM)
|
||||
{
|
||||
struct savexmm *xmm = (struct savexmm *)(&ucontext->uc_mcontext.mc_fpstate);
|
||||
return xmm->sv_env.en_sw | xmm->sv_env.en_mxcsr;
|
||||
} else
|
||||
}
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
inline static void uap_clear_fpu_status(void *uap)
|
||||
{
|
||||
ucontext_t *ucontext = (ucontext_t *)uap;
|
||||
if (uap->uc_mcontext.mc_fpformat == _MC_FPFMT_387) {
|
||||
if (uap->uc_mcontext.mc_fpformat == _MC_FPFMT_387)
|
||||
{
|
||||
struct save87 *x87 = (struct save87 *)(&ucontext->uc_mcontext.mc_fpstate);
|
||||
x87->sv_env.en_sw = 0;
|
||||
} else if (uap->uc_mcontext.mc_fpformat == _MC_FPFMT_XMM) {
|
||||
}
|
||||
else if (uap->uc_mcontext.mc_fpformat == _MC_FPFMT_XMM)
|
||||
{
|
||||
struct savexmm *xmm = (struct savexmm *)(&ucontext->uc_mcontext.mc_fpstate);
|
||||
xmm->sv_env.en_sw = 0;
|
||||
xmm->sv_env.en_mxcsr &= 0xffffffc0;
|
||||
|
|
|
@ -13,17 +13,20 @@ inline static void *ucontext_stack_pointer(void *uap)
|
|||
inline static unsigned int uap_fpu_status(void *uap)
|
||||
{
|
||||
ucontext_t *ucontext = (ucontext_t *)uap;
|
||||
if (ucontext->uc_mcontext.mc_fpformat == _MC_FPFMT_XMM) {
|
||||
if (ucontext->uc_mcontext.mc_fpformat == _MC_FPFMT_XMM)
|
||||
{
|
||||
struct savexmm *xmm = (struct savexmm *)(&ucontext->uc_mcontext.mc_fpstate);
|
||||
return xmm->sv_env.en_sw | xmm->sv_env.en_mxcsr;
|
||||
} else
|
||||
}
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
inline static void uap_clear_fpu_status(void *uap)
|
||||
{
|
||||
ucontext_t *ucontext = (ucontext_t *)uap;
|
||||
if (ucontext->uc_mcontext.mc_fpformat == _MC_FPFMT_XMM) {
|
||||
if (ucontext->uc_mcontext.mc_fpformat == _MC_FPFMT_XMM)
|
||||
{
|
||||
struct savexmm *xmm = (struct savexmm *)(&ucontext->uc_mcontext.mc_fpstate);
|
||||
xmm->sv_env.en_sw = 0;
|
||||
xmm->sv_env.en_mxcsr &= 0xffffffc0;
|
||||
|
|
|
@ -5,6 +5,4 @@ namespace factor
|
|||
|
||||
#define UAP_PROGRAM_COUNTER(uap) _UC_MACHINE_PC((ucontext_t *)uap)
|
||||
|
||||
#define DIRECTORY_P(file) ((file)->d_type == DT_DIR)
|
||||
|
||||
}
|
||||
|
|
|
@ -21,7 +21,8 @@ FACTOR_STDCALL LONG exception_handler(PEXCEPTION_POINTERS pe)
|
|||
else
|
||||
signal_callstack_top = NULL;
|
||||
|
||||
switch (e->ExceptionCode) {
|
||||
switch (e->ExceptionCode)
|
||||
{
|
||||
case EXCEPTION_ACCESS_VIOLATION:
|
||||
signal_fault_addr = e->ExceptionInformation[1];
|
||||
c->EIP = (cell)memory_signal_handler_impl;
|
||||
|
@ -39,16 +40,14 @@ FACTOR_STDCALL LONG exception_handler(PEXCEPTION_POINTERS pe)
|
|||
c->FloatSave.StatusWord = 0;
|
||||
c->EIP = (cell)fp_signal_handler_impl;
|
||||
break;
|
||||
|
||||
/* If the Widcomm bluetooth stack is installed, the BTTray.exe process
|
||||
injects code into running programs. For some reason this results in
|
||||
random SEH exceptions with this (undocumented) exception code being
|
||||
raised. The workaround seems to be ignoring this altogether, since that
|
||||
is what happens if SEH is not enabled. Don't really have any idea what
|
||||
this exception means. */
|
||||
case 0x40010006:
|
||||
/* If the Widcomm bluetooth stack is installed, the BTTray.exe
|
||||
process injects code into running programs. For some reason this
|
||||
results in random SEH exceptions with this (undocumented)
|
||||
exception code being raised. The workaround seems to be ignoring
|
||||
this altogether, since that is what happens if SEH is not
|
||||
enabled. Don't really have any idea what this exception means. */
|
||||
break;
|
||||
|
||||
default:
|
||||
signal_number = e->ExceptionCode;
|
||||
c->EIP = (cell)misc_signal_handler_impl;
|
||||
|
|
Loading…
Reference in New Issue