mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2025-12-29 18:54:47 +01:00
unpacked: Use ResidualErrorOnRightShift in FPRoundBase
Fixes a bug relating to exponents that are severely out of range.
This commit is contained in:
parent
805428e35e
commit
f17cd6f2c5
2 changed files with 24 additions and 13 deletions
|
|
@ -75,3 +75,15 @@ TEST_CASE("FPUnpack<->FPRound Round-trip Tests", "[fp]") {
|
|||
REQUIRE(input == output);
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("FPRound (near zero, round to posinf)", "[fp]") {
|
||||
const FPUnpacked input = {false, -353, 0x0a98d25ace5b2000};
|
||||
|
||||
FPSR fpsr;
|
||||
FPCR fpcr;
|
||||
fpcr.RMode(RoundingMode::TowardsPlusInfinity);
|
||||
|
||||
const u32 output = FPRound<u32>(input, fpcr, fpsr);
|
||||
|
||||
REQUIRE(output == 0x00000001);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue