diff options
author | LDj3SNuD <35856442+LDj3SNuD@users.noreply.github.com> | 2020-12-07 10:37:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-07 10:37:07 +0100 |
commit | 567ea726e173040ae931a37bc85fd6cd92b69363 (patch) | |
tree | 5b6487d4821c978659732d5f34abf5aa69b0dafa /Ryujinx.Tests/Cpu/CpuTest.cs | |
parent | 668720b0883106fc1f44da70dddb8a3502ac7dbb (diff) |
Add support for guest Fz (Fpcr) mode through host Ftz and Daz (Mxcsr) modes (fast paths). (#1630)
* Add support for guest Fz (Fpcr) mode through host Ftz and Daz (Mxcsr) modes (fast paths).
* Ptc.InternalVersion = 1630
* Nits.
* Address comments.
* Update Ptc.cs
* Address comment.
Diffstat (limited to 'Ryujinx.Tests/Cpu/CpuTest.cs')
-rw-r--r-- | Ryujinx.Tests/Cpu/CpuTest.cs | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/Ryujinx.Tests/Cpu/CpuTest.cs b/Ryujinx.Tests/Cpu/CpuTest.cs index 24a60cb5..dada567d 100644 --- a/Ryujinx.Tests/Cpu/CpuTest.cs +++ b/Ryujinx.Tests/Cpu/CpuTest.cs @@ -17,8 +17,10 @@ namespace Ryujinx.Tests.Cpu protected const ulong CodeBaseAddress = 0x1000; protected const ulong DataBaseAddress = CodeBaseAddress + Size; - private const bool Ignore_FpcrFz_FpcrDn = false; - private const bool IgnoreAllExcept_FpsrQc = false; + private static bool Ignore_FpcrFz = false; + private static bool Ignore_FpcrDn = false; + + private static bool IgnoreAllExcept_FpsrQc = false; private ulong _currAddress; @@ -205,11 +207,14 @@ namespace Ryujinx.Tests.Cpu int fpsr = 0, bool runUnicorn = true) { - if (Ignore_FpcrFz_FpcrDn) + if (Ignore_FpcrFz) + { + fpcr &= ~(1 << (int)Fpcr.Fz); + } + + if (Ignore_FpcrDn) { -#pragma warning disable CS0162 - fpcr &= ~((1 << (int)Fpcr.Fz) | (1 << (int)Fpcr.Dn)); -#pragma warning restore CS0162 + fpcr &= ~(1 << (int)Fpcr.Dn); } Opcode(opcode); @@ -323,9 +328,7 @@ namespace Ryujinx.Tests.Cpu if (IgnoreAllExcept_FpsrQc) { -#pragma warning disable CS0162 fpsrMask &= Fpsr.Qc; -#pragma warning restore CS0162 } if (fpSkips != FpSkips.None) |