diff options
Diffstat (limited to 'Ryujinx.Tests')
| -rw-r--r-- | Ryujinx.Tests/Cpu/CpuTestSimd.cs | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/Ryujinx.Tests/Cpu/CpuTestSimd.cs b/Ryujinx.Tests/Cpu/CpuTestSimd.cs index c20e11ee..be3db0e7 100644 --- a/Ryujinx.Tests/Cpu/CpuTestSimd.cs +++ b/Ryujinx.Tests/Cpu/CpuTestSimd.cs @@ -825,6 +825,14 @@ namespace Ryujinx.Tests.Cpu }; } + private static uint[] _F_Cvt_S_DH_() + { + return new uint[] + { + 0x1E63C020u // FCVT H0, D1 + }; + } + private static uint[] _F_Cvt_S_HS_() { return new uint[] @@ -833,6 +841,14 @@ namespace Ryujinx.Tests.Cpu }; } + private static uint[] _F_Cvt_S_HD_() + { + return new uint[] + { + 0x1EE2C020u // FCVT D0, H1 + }; + } + private static uint[] _F_Cvt_ANZ_SU_S_S_() { return new uint[] @@ -1999,6 +2015,22 @@ namespace Ryujinx.Tests.Cpu } [Test, Pairwise] [Explicit] + public void F_Cvt_S_DH([ValueSource("_F_Cvt_S_DH_")] uint opcodes, + [ValueSource("_1D_F_")] ulong a, + [Values(RMode.Rn)] RMode rMode) + { + ulong z = TestContext.CurrentContext.Random.NextULong(); + V128 v0 = MakeVectorE0E1(z, z); + V128 v1 = MakeVectorE0(a); + + int fpcr = (int)rMode << (int)Fpcr.RMode; + + SingleOpcode(opcodes, v0: v0, v1: v1, fpcr: fpcr); + + CompareAgainstUnicorn(); + } + + [Test, Pairwise] [Explicit] public void F_Cvt_S_HS([ValueSource("_F_Cvt_S_HS_")] uint opcodes, [ValueSource("_1H_F_")] ulong a) { @@ -2012,6 +2044,19 @@ namespace Ryujinx.Tests.Cpu } [Test, Pairwise] [Explicit] + public void F_Cvt_S_HD([ValueSource("_F_Cvt_S_HD_")] uint opcodes, + [ValueSource("_1H_F_")] ulong a) + { + ulong z = TestContext.CurrentContext.Random.NextULong(); + V128 v0 = MakeVectorE0E1(z, z); + V128 v1 = MakeVectorE0(a); + + SingleOpcode(opcodes, v0: v0, v1: v1); + + CompareAgainstUnicorn(); + } + + [Test, Pairwise] [Explicit] public void F_Cvt_ANZ_SU_S_S([ValueSource("_F_Cvt_ANZ_SU_S_S_")] uint opcodes, [ValueSource("_1S_F_W_")] ulong a) { |
