aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Tests/Cpu/CpuTestSimd.cs
diff options
context:
space:
mode:
authorLDj3SNuD <35856442+LDj3SNuD@users.noreply.github.com>2021-01-19 23:12:33 +0100
committerGitHub <noreply@github.com>2021-01-20 09:12:33 +1100
commitc3e0c41da3cef647b8bea54f77103fbad85098ba (patch)
tree7548024191ab10cfac85844ccb2a77312c6d583a /Ryujinx.Tests/Cpu/CpuTestSimd.cs
parentb8353f5639cd61cfe33bb3af8f93988f31b3e444 (diff)
CPU (A64): Add Fmaxnmp & Fminnmp Scalar Inst.s, Fast & Slow Paths; with Tests. (#1894)
Diffstat (limited to 'Ryujinx.Tests/Cpu/CpuTestSimd.cs')
-rw-r--r--Ryujinx.Tests/Cpu/CpuTestSimd.cs29
1 files changed, 18 insertions, 11 deletions
diff --git a/Ryujinx.Tests/Cpu/CpuTestSimd.cs b/Ryujinx.Tests/Cpu/CpuTestSimd.cs
index 1371de4b..89c28570 100644
--- a/Ryujinx.Tests/Cpu/CpuTestSimd.cs
+++ b/Ryujinx.Tests/Cpu/CpuTestSimd.cs
@@ -715,19 +715,23 @@ namespace Ryujinx.Tests.Cpu
};
}
- private static uint[] _F_Add_P_S_2SS_()
+ private static uint[] _F_Add_Max_Min_Nm_P_S_2SS_()
{
return new uint[]
{
- 0x7E30D820u // FADDP S0, V1.2S
+ 0x7E30D820u, // FADDP S0, V1.2S
+ 0x7E30C820u, // FMAXNMP S0, V1.2S
+ 0x7EB0C820u // FMINNMP S0, V1.2S
};
}
- private static uint[] _F_Add_P_S_2DD_()
+ private static uint[] _F_Add_Max_Min_Nm_P_S_2DD_()
{
return new uint[]
{
- 0x7E70D820u // FADDP D0, V1.2D
+ 0x7E70D820u, // FADDP D0, V1.2D
+ 0x7E70C820u, // FMAXNMP D0, V1.2D
+ 0x7EF0C820u // FMINNMP D0, V1.2D
};
}
@@ -1802,12 +1806,13 @@ namespace Ryujinx.Tests.Cpu
}
[Test, Pairwise] [Explicit]
- public void F_Add_P_S_2SS([ValueSource("_F_Add_P_S_2SS_")] uint opcodes,
- [ValueSource("_2S_F_")] ulong a)
+ public void F_Add_Max_Min_Nm_P_S_2SS([ValueSource("_F_Add_Max_Min_Nm_P_S_2SS_")] uint opcodes,
+ [ValueSource("_2S_F_")] ulong a)
{
ulong z = TestContext.CurrentContext.Random.NextULong();
+
V128 v0 = MakeVectorE0E1(z, z);
- V128 v1 = MakeVectorE0(a);
+ V128 v1 = MakeVectorE0E1(a, z);
int rnd = (int)TestContext.CurrentContext.Random.NextUInt();
@@ -1820,12 +1825,14 @@ namespace Ryujinx.Tests.Cpu
}
[Test, Pairwise] [Explicit]
- public void F_Add_P_S_2DD([ValueSource("_F_Add_P_S_2DD_")] uint opcodes,
- [ValueSource("_1D_F_")] ulong a)
+ public void F_Add_Max_Min_Nm_P_S_2DD([ValueSource("_F_Add_Max_Min_Nm_P_S_2DD_")] uint opcodes,
+ [ValueSource("_1D_F_")] ulong a0,
+ [ValueSource("_1D_F_")] ulong a1)
{
ulong z = TestContext.CurrentContext.Random.NextULong();
- V128 v0 = MakeVectorE1(z);
- V128 v1 = MakeVectorE0E1(a, a);
+
+ V128 v0 = MakeVectorE0E1(z, z);
+ V128 v1 = MakeVectorE0E1(a0, a1);
int rnd = (int)TestContext.CurrentContext.Random.NextUInt();