Merge pull request #498 from lioncash/ahp

A32/location_descriptor: Add AHP bit to the FPSCR mask
This commit is contained in:
Merry 2019-05-05 11:50:37 +01:00 committed by MerryMage
commit bab4e29075
2 changed files with 7 additions and 6 deletions

View file

@ -141,6 +141,7 @@ void A32JitState::ResetRSB() {
* *
* VFP FPSCR mode bits * VFP FPSCR mode bits
* ------------------- * -------------------
* AHP bit 26 Alternate half-precision
* DN bit 25 Default NaN * DN bit 25 Default NaN
* FZ bit 24 Flush to Zero * FZ bit 24 Flush to Zero
* RMode bits 22-23 Round to {0 = Nearest, 1 = Positive, 2 = Negative, 3 = Zero} * RMode bits 22-23 Round to {0 = Nearest, 1 = Positive, 2 = Negative, 3 = Zero}

View file

@ -26,7 +26,7 @@ class LocationDescriptor {
public: public:
// Indicates bits that should be preserved within descriptors. // Indicates bits that should be preserved within descriptors.
static constexpr u32 CPSR_MODE_MASK = 0x00000220; static constexpr u32 CPSR_MODE_MASK = 0x00000220;
static constexpr u32 FPSCR_MODE_MASK = 0x03F79F00; static constexpr u32 FPSCR_MODE_MASK = 0x07F79F00;
LocationDescriptor(u32 arm_pc, PSR cpsr, FPSCR fpscr) LocationDescriptor(u32 arm_pc, PSR cpsr, FPSCR fpscr)
: arm_pc(arm_pc), cpsr(cpsr.Value() & CPSR_MODE_MASK), fpscr(fpscr.Value() & FPSCR_MODE_MASK) {} : arm_pc(arm_pc), cpsr(cpsr.Value() & CPSR_MODE_MASK), fpscr(fpscr.Value() & FPSCR_MODE_MASK) {}