Gekko: Convert UReg_FPSCR over to using Common::BitField
This commit is contained in:
parent
4ecdcc9d78
commit
4591246608
|
@ -428,65 +428,63 @@ enum FPSCRExceptionFlag : u32
|
||||||
|
|
||||||
// Floating Point Status and Control Register
|
// Floating Point Status and Control Register
|
||||||
union UReg_FPSCR
|
union UReg_FPSCR
|
||||||
{
|
|
||||||
struct
|
|
||||||
{
|
{
|
||||||
// Rounding mode (towards: nearest, zero, +inf, -inf)
|
// Rounding mode (towards: nearest, zero, +inf, -inf)
|
||||||
FPURoundMode::RoundMode RN : 2;
|
BitField<0, 2, FPURoundMode::RoundMode> RN;
|
||||||
// Non-IEEE mode enable (aka flush-to-zero)
|
// Non-IEEE mode enable (aka flush-to-zero)
|
||||||
u32 NI : 1;
|
BitField<2, 1, u32> NI;
|
||||||
// Inexact exception enable
|
// Inexact exception enable
|
||||||
u32 XE : 1;
|
BitField<3, 1, u32> XE;
|
||||||
// IEEE division by zero exception enable
|
// IEEE division by zero exception enable
|
||||||
u32 ZE : 1;
|
BitField<4, 1, u32> ZE;
|
||||||
// IEEE underflow exception enable
|
// IEEE underflow exception enable
|
||||||
u32 UE : 1;
|
BitField<5, 1, u32> UE;
|
||||||
// IEEE overflow exception enable
|
// IEEE overflow exception enable
|
||||||
u32 OE : 1;
|
BitField<6, 1, u32> OE;
|
||||||
// Invalid operation exception enable
|
// Invalid operation exception enable
|
||||||
u32 VE : 1;
|
BitField<7, 1, u32> VE;
|
||||||
// Invalid operation exception for integer conversion (sticky)
|
// Invalid operation exception for integer conversion (sticky)
|
||||||
u32 VXCVI : 1;
|
BitField<8, 1, u32> VXCVI;
|
||||||
// Invalid operation exception for square root (sticky)
|
// Invalid operation exception for square root (sticky)
|
||||||
u32 VXSQRT : 1;
|
BitField<9, 1, u32> VXSQRT;
|
||||||
// Invalid operation exception for software request (sticky)
|
// Invalid operation exception for software request (sticky)
|
||||||
u32 VXSOFT : 1;
|
BitField<10, 1, u32> VXSOFT;
|
||||||
// reserved
|
// reserved
|
||||||
u32 : 1;
|
BitField<11, 1, u32> reserved;
|
||||||
// Floating point result flags (includes FPCC) (not sticky)
|
// Floating point result flags (includes FPCC) (not sticky)
|
||||||
// from more to less significand: class, <, >, =, ?
|
// from more to less significand: class, <, >, =, ?
|
||||||
u32 FPRF : 5;
|
BitField<12, 5, u32> FPRF;
|
||||||
// Fraction inexact (not sticky)
|
// Fraction inexact (not sticky)
|
||||||
u32 FI : 1;
|
BitField<17, 1, u32> FI;
|
||||||
// Fraction rounded (not sticky)
|
// Fraction rounded (not sticky)
|
||||||
u32 FR : 1;
|
BitField<18, 1, u32> FR;
|
||||||
// Invalid operation exception for invalid comparison (sticky)
|
// Invalid operation exception for invalid comparison (sticky)
|
||||||
u32 VXVC : 1;
|
BitField<19, 1, u32> VXVC;
|
||||||
// Invalid operation exception for inf * 0 (sticky)
|
// Invalid operation exception for inf * 0 (sticky)
|
||||||
u32 VXIMZ : 1;
|
BitField<20, 1, u32> VXIMZ;
|
||||||
// Invalid operation exception for 0 / 0 (sticky)
|
// Invalid operation exception for 0 / 0 (sticky)
|
||||||
u32 VXZDZ : 1;
|
BitField<21, 1, u32> VXZDZ;
|
||||||
// Invalid operation exception for inf / inf (sticky)
|
// Invalid operation exception for inf / inf (sticky)
|
||||||
u32 VXIDI : 1;
|
BitField<22, 1, u32> VXIDI;
|
||||||
// Invalid operation exception for inf - inf (sticky)
|
// Invalid operation exception for inf - inf (sticky)
|
||||||
u32 VXISI : 1;
|
BitField<23, 1, u32> VXISI;
|
||||||
// Invalid operation exception for SNaN (sticky)
|
// Invalid operation exception for SNaN (sticky)
|
||||||
u32 VXSNAN : 1;
|
BitField<24, 1, u32> VXSNAN;
|
||||||
// Inexact exception (sticky)
|
// Inexact exception (sticky)
|
||||||
u32 XX : 1;
|
BitField<25, 1, u32> XX;
|
||||||
// Division by zero exception (sticky)
|
// Division by zero exception (sticky)
|
||||||
u32 ZX : 1;
|
BitField<26, 1, u32> ZX;
|
||||||
// Underflow exception (sticky)
|
// Underflow exception (sticky)
|
||||||
u32 UX : 1;
|
BitField<27, 1, u32> UX;
|
||||||
// Overflow exception (sticky)
|
// Overflow exception (sticky)
|
||||||
u32 OX : 1;
|
BitField<28, 1, u32> OX;
|
||||||
// Invalid operation exception summary (not sticky)
|
// Invalid operation exception summary (not sticky)
|
||||||
u32 VX : 1;
|
BitField<29, 1, u32> VX;
|
||||||
// Enabled exception summary (not sticky)
|
// Enabled exception summary (not sticky)
|
||||||
u32 FEX : 1;
|
BitField<30, 1, u32> FEX;
|
||||||
// Exception summary (sticky)
|
// Exception summary (sticky)
|
||||||
u32 FX : 1;
|
BitField<31, 1, u32> FX;
|
||||||
};
|
|
||||||
u32 Hex = 0;
|
u32 Hex = 0;
|
||||||
|
|
||||||
// The FPSCR's 20th bit (11th from a little endian perspective)
|
// The FPSCR's 20th bit (11th from a little endian perspective)
|
||||||
|
|
|
@ -226,7 +226,7 @@ void Interpreter::fcmpu(UGeckoInstruction inst)
|
||||||
|
|
||||||
void Interpreter::fctiwx(UGeckoInstruction inst)
|
void Interpreter::fctiwx(UGeckoInstruction inst)
|
||||||
{
|
{
|
||||||
ConvertToInteger(inst, static_cast<RoundingMode>(FPSCR.RN));
|
ConvertToInteger(inst, static_cast<RoundingMode>(FPSCR.RN.Value()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Interpreter::fctiwzx(UGeckoInstruction inst)
|
void Interpreter::fctiwzx(UGeckoInstruction inst)
|
||||||
|
|
Loading…
Reference in New Issue