mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-30 15:32:47 +00:00
Interpreter: Optimize FEX calculation
The next commit will make the interpreter run this after every float instruction, so I think a little optimization here is justified.
This commit is contained in:
parent
83c6df1965
commit
89a464dafa
@ -419,11 +419,17 @@ enum FPSCRExceptionFlag : u32
|
||||
FPSCR_VXSQRT = 1U << (31 - 22),
|
||||
FPSCR_VXCVI = 1U << (31 - 23),
|
||||
FPSCR_VE = 1U << (31 - 24),
|
||||
FPSCR_OE = 1U << (31 - 25),
|
||||
FPSCR_UE = 1U << (31 - 26),
|
||||
FPSCR_ZE = 1U << (31 - 27),
|
||||
FPSCR_XE = 1U << (31 - 28),
|
||||
|
||||
FPSCR_VX_ANY = FPSCR_VXSNAN | FPSCR_VXISI | FPSCR_VXIDI | FPSCR_VXZDZ | FPSCR_VXIMZ | FPSCR_VXVC |
|
||||
FPSCR_VXSOFT | FPSCR_VXSQRT | FPSCR_VXCVI,
|
||||
|
||||
FPSCR_ANY_X = FPSCR_OX | FPSCR_UX | FPSCR_ZX | FPSCR_XX | FPSCR_VX_ANY,
|
||||
|
||||
FPSCR_ANY_E = FPSCR_VE | FPSCR_OE | FPSCR_UE | FPSCR_ZE | FPSCR_XE,
|
||||
};
|
||||
|
||||
// Floating Point Status and Control Register
|
||||
|
@ -40,8 +40,7 @@ static void FPSCRUpdated(UReg_FPSCR fp)
|
||||
static void UpdateFPSCR(UReg_FPSCR* fpscr)
|
||||
{
|
||||
fpscr->VX = (fpscr->Hex & FPSCR_VX_ANY) != 0;
|
||||
fpscr->FEX = (fpscr->VX & fpscr->VE) | (fpscr->OX & fpscr->OE) | (fpscr->UX & fpscr->UE) |
|
||||
(fpscr->ZX & fpscr->ZE) | (fpscr->XX & fpscr->XE);
|
||||
fpscr->FEX = ((fpscr->Hex >> 22) & (fpscr->Hex & FPSCR_ANY_E)) != 0;
|
||||
}
|
||||
|
||||
void Interpreter::mtfsb0x(UGeckoInstruction inst)
|
||||
|
Loading…
x
Reference in New Issue
Block a user