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

@ -135,17 +135,18 @@ void A32JitState::ResetRSB() {
* *
* SSE MXCSR mode bits * SSE MXCSR mode bits
* ------------------- * -------------------
* FZ bit 15 Flush To Zero * FZ bit 15 Flush To Zero
* DAZ bit 6 Denormals Are Zero * DAZ bit 6 Denormals Are Zero
* RN bits 13-14 Round to {0 = Nearest, 1 = Negative, 2 = Positive, 3 = Zero} * RN bits 13-14 Round to {0 = Nearest, 1 = Negative, 2 = Positive, 3 = Zero}
* *
* VFP FPSCR mode bits * VFP FPSCR mode bits
* ------------------- * -------------------
* DN bit 25 Default NaN * AHP bit 26 Alternate half-precision
* FZ bit 24 Flush to Zero * DN bit 25 Default NaN
* 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}
* Stride bits 20-21 Vector stride * Stride bits 20-21 Vector stride
* Len bits 16-18 Vector length * Len bits 16-18 Vector length
*/ */
// NZCV; QC (ASMID only), AHP; DN, FZ, RMode, Stride; SBZP; Len; trap enables; cumulative bits // NZCV; QC (ASMID only), AHP; DN, FZ, RMode, Stride; SBZP; Len; trap enables; cumulative bits

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) {}