diff options
| author | JosJuice <josjuice@gmail.com> | 2021-06-13 14:22:59 +0200 |
|---|---|---|
| committer | JosJuice <josjuice@gmail.com> | 2021-06-27 20:34:49 +0200 |
| commit | def5666419a04c22c61925f96d2c970a0bb01d72 (patch) | |
| tree | 8b0fb0681fb034bc891d2e1979e0e8ab2b0bec8d /Source/Core | |
| parent | aff39af5fba2d3869767995719f0c187c7694e28 (diff) | |
JitArm64: Fix FPRF handling of denormal singles
The interpreter was wrong after all. Hardware verified.
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/Core/PowerPC/JitArm64/JitAsm.cpp | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/Source/Core/Core/PowerPC/JitArm64/JitAsm.cpp b/Source/Core/Core/PowerPC/JitArm64/JitAsm.cpp index 0fe91bd34d..0f09176fda 100644 --- a/Source/Core/Core/PowerPC/JitArm64/JitAsm.cpp +++ b/Source/Core/Core/PowerPC/JitArm64/JitAsm.cpp @@ -455,25 +455,12 @@ void JitArm64::GenerateFPRF(bool single) FixupBranch nan_or_inf = B(CCFlags::CC_EQ); // exp != 0 && exp != EXP_MASK - const u8* normal = GetCodePtr(); emit_write_fprf_and_ret(); // exp == 0 SetJumpTarget(zero_or_denormal); TSTI2R(input_reg, INPUT_FRAC_MASK); - FixupBranch denormal; - if (single) - { - // To match the interpreter, what we output should be based on how the input would be classified - // after conversion to double. Converting a denormal single to a double always results in a - // normal double, so for denormal singles we need to output PPC_FPCLASS_PN/PPC_FPCLASS_NN. - // TODO: Hardware test that the interpreter actually is correct. - B(CCFlags::CC_NEQ, normal); - } - else - { - denormal = B(CCFlags::CC_NEQ); - } + FixupBranch denormal = B(CCFlags::CC_NEQ); // exp == 0 && frac == 0 LSR(ARM64Reg::W1, fprf_reg, 3); @@ -483,8 +470,7 @@ void JitArm64::GenerateFPRF(bool single) emit_write_fprf_and_ret(); // exp == 0 && frac != 0 - if (!single) - SetJumpTarget(denormal); + SetJumpTarget(denormal); ORRI2R(fprf_reg, fprf_reg, Common::PPC_FPCLASS_PD & ~OUTPUT_SIGN_MASK); B(write_fprf_and_ret); |
