CPU (A64): Add Fmaxnmp & Fminnmp Scalar Inst.s, Fast & Slow Paths; with Tests. (#1894)
This commit is contained in:
parent
b8353f5639
commit
c3e0c41da3
7 changed files with 111 additions and 25 deletions
|
@ -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();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue