From f178562ee7b81511d09812c197d21d2ee26eb66c Mon Sep 17 00:00:00 2001 From: MerryMage Date: Sun, 5 May 2019 19:38:51 +0100 Subject: [PATCH] a32_jitstate: Remove exception trap enables from FPSCR_MODE_MASK We don't currently use this for anything (we do not currently trap floating point exceptions). This frees these bits up for other purposes. --- src/backend/x64/a32_jitstate.cpp | 3 --- src/frontend/A32/location_descriptor.h | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/backend/x64/a32_jitstate.cpp b/src/backend/x64/a32_jitstate.cpp index bee1530b..aac8c8f4 100644 --- a/src/backend/x64/a32_jitstate.cpp +++ b/src/backend/x64/a32_jitstate.cpp @@ -177,9 +177,6 @@ void A32JitState::SetFpscr(u32 FPSCR) { // Exception masks / enables guest_MXCSR |= 0x00001f80; // mask all - //guest_MXCSR |= (~FPSCR >> 1) & 0b0000010000000; // IM = ~IOE - //guest_MXCSR |= (~FPSCR >> 7) & 0b0000100000000; // DM = ~IDE - //guest_MXCSR |= (~FPSCR ) & 0b1111000000000; // PM, UM, OM, ZM = ~IXE, ~UFE, ~OFE, ~DZE // RMode const std::array MXCSR_RMode {0x0, 0x4000, 0x2000, 0x6000}; diff --git a/src/frontend/A32/location_descriptor.h b/src/frontend/A32/location_descriptor.h index ddac5767..0269b7a8 100644 --- a/src/frontend/A32/location_descriptor.h +++ b/src/frontend/A32/location_descriptor.h @@ -26,7 +26,7 @@ class LocationDescriptor { public: // Indicates bits that should be preserved within descriptors. static constexpr u32 CPSR_MODE_MASK = 0x00000220; - static constexpr u32 FPSCR_MODE_MASK = 0x07F79F00; + static constexpr u32 FPSCR_MODE_MASK = 0x07F70000; LocationDescriptor(u32 arm_pc, PSR cpsr, FPSCR fpscr) : arm_pc(arm_pc), cpsr(cpsr.Value() & CPSR_MODE_MASK), fpscr(fpscr.Value() & FPSCR_MODE_MASK) {}