diff --git a/src/Ryujinx.Tests/Cpu/CpuTestBf32.cs b/src/Ryujinx.Tests/Cpu/CpuTestBf32.cs index 9579d73e7..21b3e6eda 100644 --- a/src/Ryujinx.Tests/Cpu/CpuTestBf32.cs +++ b/src/Ryujinx.Tests/Cpu/CpuTestBf32.cs @@ -1,5 +1,6 @@ -// #define Bf32 +#define Bf32 +using System; using Xunit; namespace Ryujinx.Tests.Cpu @@ -10,33 +11,48 @@ namespace Ryujinx.Tests.Cpu #if Bf32 private const int RndCnt = 2; - [Test, Pairwise, Description("BFC , #, #")] - public void Bfc([Values(0u, 0xdu)] uint rd, - [Values(0x00000000u, 0x7FFFFFFFu, - 0x80000000u, 0xFFFFFFFFu)] uint wd, - [Values(0u, 15u, 16u, 31u)] uint lsb, - [Values(0u, 15u, 16u, 31u)] uint msb) + private static readonly uint[] _testData_rd = + { + 0u, 0xdu, + }; + private static readonly uint[] _testData_wd = + { + 0x00000000u, 0x7FFFFFFFu, + 0x80000000u, 0xFFFFFFFFu, + }; + private static readonly uint[] _testData_lsb = + { + 0u, 15u, 16u, 31u, + }; + + public static readonly MatrixTheoryData TestData_Bfc = new(_testData_rd, _testData_wd, _testData_lsb, _testData_lsb); + + [Theory(DisplayName = "BFC , #, #")] + [MemberData(nameof(TestData_Bfc))] + public void Bfc(uint rd, uint wd, uint lsb, uint msb) { msb = Math.Max(lsb, msb); // Don't test unpredictable for now. uint opcode = 0xe7c0001fu; // BFC R0, #0, #1 opcode |= ((rd & 0xf) << 12); opcode |= ((msb & 31) << 16) | ((lsb & 31) << 7); - uint sp = TestContext.CurrentContext.Random.NextUInt(); + uint sp = Random.Shared.NextUInt(); SingleOpcode(opcode, r0: wd, sp: sp); CompareAgainstUnicorn(); } - [Test, Pairwise, Description("BFI , , #, #")] - public void Bfi([Values(0u, 0xdu)] uint rd, - [Values(1u, 0xdu)] uint rn, - [Random(RndCnt)] uint wd, - [Values(0x00000000u, 0x7FFFFFFFu, - 0x80000000u, 0xFFFFFFFFu)] uint wn, - [Values(0u, 15u, 16u, 31u)] uint lsb, - [Values(0u, 15u, 16u, 31u)] uint msb) + private static readonly uint[] _testData_rn = + { + 1u, 0xdu, + }; + + public static readonly MatrixTheoryData TestData_Bfi = new(_testData_rd, _testData_rn, Random.Shared.NextUIntEnumerable(RndCnt), _testData_wd, _testData_lsb, _testData_lsb); + + [Theory(DisplayName = "BFI , , #, #")] + [MemberData(nameof(TestData_Bfi))] + public void Bfi(uint rd, uint rn, uint wd, uint wn, uint lsb, uint msb) { msb = Math.Max(lsb, msb); // Don't test unpredictable for now. uint opcode = 0xe7c00010u; // BFI R0, R0, #0, #1 @@ -44,21 +60,16 @@ namespace Ryujinx.Tests.Cpu opcode |= ((rn & 0xf) << 0); opcode |= ((msb & 31) << 16) | ((lsb & 31) << 7); - uint sp = TestContext.CurrentContext.Random.NextUInt(); + uint sp = Random.Shared.NextUInt(); SingleOpcode(opcode, r0: wd, r1: wn, sp: sp); CompareAgainstUnicorn(); } - [Test, Pairwise, Description("UBFX , , #, #")] - public void Ubfx([Values(0u, 0xdu)] uint rd, - [Values(1u, 0xdu)] uint rn, - [Random(RndCnt)] uint wd, - [Values(0x00000000u, 0x7FFFFFFFu, - 0x80000000u, 0xFFFFFFFFu)] uint wn, - [Values(0u, 15u, 16u, 31u)] uint lsb, - [Values(0u, 15u, 16u, 31u)] uint widthm1) + [Theory(DisplayName = "UBFX , , #, #")] + [MemberData(nameof(TestData_Bfi))] + public void Ubfx(uint rd, uint rn, uint wd, uint wn, uint lsb, uint widthm1) { if (lsb + widthm1 > 31) { @@ -69,21 +80,16 @@ namespace Ryujinx.Tests.Cpu opcode |= ((rn & 0xf) << 0); opcode |= ((widthm1 & 31) << 16) | ((lsb & 31) << 7); - uint sp = TestContext.CurrentContext.Random.NextUInt(); + uint sp = Random.Shared.NextUInt(); SingleOpcode(opcode, r0: wd, r1: wn, sp: sp); CompareAgainstUnicorn(); } - [Test, Pairwise, Description("SBFX , , #, #")] - public void Sbfx([Values(0u, 0xdu)] uint rd, - [Values(1u, 0xdu)] uint rn, - [Random(RndCnt)] uint wd, - [Values(0x00000000u, 0x7FFFFFFFu, - 0x80000000u, 0xFFFFFFFFu)] uint wn, - [Values(0u, 15u, 16u, 31u)] uint lsb, - [Values(0u, 15u, 16u, 31u)] uint widthm1) + [Theory(DisplayName = "SBFX , , #, #")] + [MemberData(nameof(TestData_Bfi))] + public void Sbfx(uint rd, uint rn, uint wd, uint wn, uint lsb, uint widthm1) { if (lsb + widthm1 > 31) { @@ -94,7 +100,7 @@ namespace Ryujinx.Tests.Cpu opcode |= ((rn & 0xf) << 0); opcode |= ((widthm1 & 31) << 16) | ((lsb & 31) << 7); - uint sp = TestContext.CurrentContext.Random.NextUInt(); + uint sp = Random.Shared.NextUInt(); SingleOpcode(opcode, r0: wd, r1: wn, sp: sp); diff --git a/src/Ryujinx.Tests/Cpu/CpuTestMul32.cs b/src/Ryujinx.Tests/Cpu/CpuTestMul32.cs index 1b731192e..d1a15cec8 100644 --- a/src/Ryujinx.Tests/Cpu/CpuTestMul32.cs +++ b/src/Ryujinx.Tests/Cpu/CpuTestMul32.cs @@ -1,5 +1,6 @@ -// #define Mul32 +#define Mul32 +using System; using Xunit; namespace Ryujinx.Tests.Cpu @@ -51,82 +52,82 @@ namespace Ryujinx.Tests.Cpu } #endregion - [Test, Pairwise, Description("SMLA , , , ")] - public void Smla___32bit([ValueSource(nameof(_Smlabb_Smlabt_Smlatb_Smlatt_))] uint opcode, - [Values(0u, 0xdu)] uint rn, - [Values(1u, 0xdu)] uint rm, - [Values(2u, 0xdu)] uint ra, - [Values(3u, 0xdu)] uint rd, - [Values(0x00000000u, 0x7FFFFFFFu, - 0x80000000u, 0xFFFFFFFFu)] uint wn, - [Values(0x00000000u, 0x7FFFFFFFu, - 0x80000000u, 0xFFFFFFFFu)] uint wm, - [Values(0x00000000u, 0x7FFFFFFFu, - 0x80000000u, 0xFFFFFFFFu)] uint wa) + private static readonly uint[] _testData_rn = + { + 0u, 0xdu, + }; + private static readonly uint[] _testData_rm = + { + 1u, 0xdu, + }; + private static readonly uint[] _testData_ra = + { + 2u, 0xdu, + }; + private static readonly uint[] _testData_rd = + { + 3u, 0xdu, + }; + private static readonly uint[] _testData_wn = + { + 0x00000000u, 0x7FFFFFFFu, + 0x80000000u, 0xFFFFFFFFu, + }; + + public static readonly MatrixTheoryData TestData_Smla = new(_Smlabb_Smlabt_Smlatb_Smlatt_(), _testData_rn, _testData_rm, _testData_ra, _testData_rd, _testData_wn, _testData_wn, _testData_wn); + + [Theory(DisplayName = "SMLA , , , ")] + [MemberData(nameof(TestData_Smla))] + public void Smla___32bit(uint opcode, uint rn, uint rm, uint ra, uint rd, uint wn, uint wm, uint wa) { opcode |= ((rn & 15) << 0) | ((rm & 15) << 8) | ((ra & 15) << 12) | ((rd & 15) << 16); - uint w31 = TestContext.CurrentContext.Random.NextUInt(); + uint w31 = Random.Shared.NextUInt(); SingleOpcode(opcode, r0: wn, r1: wm, r2: wa, sp: w31); CompareAgainstUnicorn(); } - [Test, Pairwise, Description("SMLAW , , , ")] - public void Smlaw__32bit([ValueSource(nameof(_Smlawb_Smlawt_))] uint opcode, - [Values(0u, 0xdu)] uint rn, - [Values(1u, 0xdu)] uint rm, - [Values(2u, 0xdu)] uint ra, - [Values(3u, 0xdu)] uint rd, - [Values(0x00000000u, 0x7FFFFFFFu, - 0x80000000u, 0xFFFFFFFFu)] uint wn, - [Values(0x00000000u, 0x7FFFFFFFu, - 0x80000000u, 0xFFFFFFFFu)] uint wm, - [Values(0x00000000u, 0x7FFFFFFFu, - 0x80000000u, 0xFFFFFFFFu)] uint wa) + public static readonly MatrixTheoryData TestData_Smlaw = new(_Smlawb_Smlawt_(), _testData_rn, _testData_rm, _testData_ra, _testData_rd, _testData_wn, _testData_wn, _testData_wn); + + [Theory(DisplayName = "SMLAW , , , ")] + [MemberData(nameof(TestData_Smlaw))] + public void Smlaw__32bit(uint opcode, uint rn, uint rm, uint ra, uint rd, uint wn, uint wm, uint wa) { opcode |= ((rn & 15) << 0) | ((rm & 15) << 8) | ((ra & 15) << 12) | ((rd & 15) << 16); - uint w31 = TestContext.CurrentContext.Random.NextUInt(); + uint w31 = Random.Shared.NextUInt(); SingleOpcode(opcode, r0: wn, r1: wm, r2: wa, sp: w31); CompareAgainstUnicorn(); } - [Test, Pairwise, Description("SMUL , , ")] - public void Smul___32bit([ValueSource(nameof(_Smulbb_Smulbt_Smultb_Smultt_))] uint opcode, - [Values(0u, 0xdu)] uint rn, - [Values(1u, 0xdu)] uint rm, - [Values(2u, 0xdu)] uint rd, - [Values(0x00000000u, 0x7FFFFFFFu, - 0x80000000u, 0xFFFFFFFFu)] uint wn, - [Values(0x00000000u, 0x7FFFFFFFu, - 0x80000000u, 0xFFFFFFFFu)] uint wm) + public static readonly MatrixTheoryData TestData_Smul = new(_Smulbb_Smulbt_Smultb_Smultt_(), _testData_rn, _testData_rm, _testData_rd, _testData_wn, _testData_wn); + + [Theory(DisplayName = "SMUL , , ")] + [MemberData(nameof(TestData_Smul))] + public void Smul___32bit(uint opcode, uint rn, uint rm, uint rd, uint wn, uint wm) { opcode |= ((rn & 15) << 0) | ((rm & 15) << 8) | ((rd & 15) << 16); - uint w31 = TestContext.CurrentContext.Random.NextUInt(); + uint w31 = Random.Shared.NextUInt(); SingleOpcode(opcode, r0: wn, r1: wm, sp: w31); CompareAgainstUnicorn(); } - [Test, Pairwise, Description("SMULW , , ")] - public void Smulw__32bit([ValueSource(nameof(_Smulwb_Smulwt_))] uint opcode, - [Values(0u, 0xdu)] uint rn, - [Values(1u, 0xdu)] uint rm, - [Values(2u, 0xdu)] uint rd, - [Values(0x00000000u, 0x7FFFFFFFu, - 0x80000000u, 0xFFFFFFFFu)] uint wn, - [Values(0x00000000u, 0x7FFFFFFFu, - 0x80000000u, 0xFFFFFFFFu)] uint wm) + public static readonly MatrixTheoryData TestData_Smulw = new(_Smulwb_Smulwt_(), _testData_rn, _testData_rm, _testData_rd, _testData_wn, _testData_wn); + + [Theory(DisplayName = "SMULW , , ")] + [MemberData(nameof(TestData_Smulw))] + public void Smulw__32bit(uint opcode, uint rn, uint rm, uint rd, uint wn, uint wm) { opcode |= ((rn & 15) << 0) | ((rm & 15) << 8) | ((rd & 15) << 16); - uint w31 = TestContext.CurrentContext.Random.NextUInt(); + uint w31 = Random.Shared.NextUInt(); SingleOpcode(opcode, r0: wn, r1: wm, sp: w31); diff --git a/src/Ryujinx.Tests/Cpu/CpuTestSimdTbl.cs b/src/Ryujinx.Tests/Cpu/CpuTestSimdTbl.cs index 02cb49ce8..d086209f2 100644 --- a/src/Ryujinx.Tests/Cpu/CpuTestSimdTbl.cs +++ b/src/Ryujinx.Tests/Cpu/CpuTestSimdTbl.cs @@ -1,5 +1,8 @@ -// #define SimdTbl +#define SimdTbl +using ARMeilleure.State; +using System; +using System.Collections.Generic; using Xunit; namespace Ryujinx.Tests.Cpu @@ -21,10 +24,10 @@ namespace Ryujinx.Tests.Cpu for (int cnt = 1; cnt <= 8; cnt++) { - ulong idxInRng = TestContext.CurrentContext.Random.NextByte(IdxInRngMin, idxInRngMax); - ulong idxOutRng = TestContext.CurrentContext.Random.NextByte(idxOutRngMin, IdxOutRngMax); + ulong idxInRng = Random.Shared.NextByte(IdxInRngMin, idxInRngMax); + ulong idxOutRng = Random.Shared.NextByte(idxOutRngMin, IdxOutRngMax); - ulong idx = TestContext.CurrentContext.Random.NextBool() ? idxInRng : idxOutRng; + ulong idx = Random.Shared.NextBool() ? idxInRng : idxOutRng; idxs = (idxs << 8) | idx; } @@ -135,15 +138,28 @@ namespace Ryujinx.Tests.Cpu private const int RndCntIdxs = 2; - [Test, Pairwise] - public void SingleRegisterTable_V_8B_16B([ValueSource(nameof(_SingleRegisterTable_V_8B_16B_))] uint opcodes, - [Values(0u)] uint rd, - [Values(1u)] uint rn, - [Values(2u)] uint rm, - [ValueSource(nameof(_8B_))] ulong z, - [ValueSource(nameof(_8B_))] ulong table0, - [ValueSource(nameof(_GenIdxsForTbl1_))] ulong indexes, - [Values(0b0u, 0b1u)] uint q) // <8B, 16B> + private static readonly uint[] _testData_rd = + { + 0u, + }; + private static readonly uint[] _testData_rn = + { + 1u, + }; + private static readonly uint[] _testData_rm = + { + 2u, + }; + private static readonly uint[] _testData_q = + { + 0b0u, 0b1u, // <8B, 16B> + }; + + public static readonly MatrixTheoryData TestData = new(_SingleRegisterTable_V_8B_16B_(), _testData_rd, _testData_rn, _testData_rm, _8B_(), _8B_(), _GenIdxsForTbl1_(), _testData_q); + + [Theory] + [MemberData(nameof(TestData))] + public void SingleRegisterTable_V_8B_16B(uint opcodes, uint rd, uint rn, uint rm, ulong z, ulong table0, ulong indexes, uint q) { opcodes |= ((rm & 31) << 16) | ((rn & 31) << 5) | ((rd & 31) << 0); opcodes |= ((q & 1) << 30); @@ -157,16 +173,17 @@ namespace Ryujinx.Tests.Cpu CompareAgainstUnicorn(); } - [Test, Pairwise] - public void TwoRegisterTable_V_8B_16B([ValueSource(nameof(_TwoRegisterTable_V_8B_16B_))] uint opcodes, - [Values(0u)] uint rd, - [Values(1u)] uint rn, - [Values(3u)] uint rm, - [ValueSource(nameof(_8B_))] ulong z, - [ValueSource(nameof(_8B_))] ulong table0, - [ValueSource(nameof(_8B_))] ulong table1, - [ValueSource(nameof(_GenIdxsForTbl2_))] ulong indexes, - [Values(0b0u, 0b1u)] uint q) // <8B, 16B> + private static readonly uint[] _testData_Two_rm = + { + 3u, + }; + + public static readonly MatrixTheoryData TestData_Two = + new(_TwoRegisterTable_V_8B_16B_(), _testData_rd, _testData_rn, _testData_Two_rm, _8B_(), _8B_(), _8B_(), _GenIdxsForTbl2_(), _testData_q); + + [Theory] + [MemberData(nameof(TestData_Two))] + public void TwoRegisterTable_V_8B_16B(uint opcodes, uint rd, uint rn, uint rm, ulong z, ulong table0, ulong table1, ulong indexes, uint q) { opcodes |= ((rm & 31) << 16) | ((rn & 31) << 5) | ((rd & 31) << 0); opcodes |= ((q & 1) << 30); @@ -181,16 +198,25 @@ namespace Ryujinx.Tests.Cpu CompareAgainstUnicorn(); } - [Test, Pairwise] - public void Mod_TwoRegisterTable_V_8B_16B([ValueSource(nameof(_TwoRegisterTable_V_8B_16B_))] uint opcodes, - [Values(30u, 1u)] uint rd, - [Values(31u)] uint rn, - [Values(1u, 30u)] uint rm, - [ValueSource(nameof(_8B_))] ulong z, - [ValueSource(nameof(_8B_))] ulong table0, - [ValueSource(nameof(_8B_))] ulong table1, - [ValueSource(nameof(_GenIdxsForTbl2_))] ulong indexes, - [Values(0b0u, 0b1u)] uint q) // <8B, 16B> + private static readonly uint[] _testData_ModTwo_rd = + { + 30u, 1u, + }; + private static readonly uint[] _testData_ModTwo_rn = + { + 31u, + }; + private static readonly uint[] _testData_ModTwo_rm = + { + 1u, 30u, + }; + + public static readonly MatrixTheoryData TestData_ModTwo = + new(_TwoRegisterTable_V_8B_16B_(), _testData_ModTwo_rd, _testData_ModTwo_rn, _testData_ModTwo_rm, _8B_(), _8B_(), _8B_(), _GenIdxsForTbl2_(), _testData_q); + + [Theory] + [MemberData(nameof(TestData_ModTwo))] + public void Mod_TwoRegisterTable_V_8B_16B(uint opcodes, uint rd, uint rn, uint rm, ulong z, ulong table0, ulong table1, ulong indexes, uint q) { opcodes |= ((rm & 31) << 16) | ((rn & 31) << 5) | ((rd & 31) << 0); opcodes |= ((q & 1) << 30); @@ -205,17 +231,17 @@ namespace Ryujinx.Tests.Cpu CompareAgainstUnicorn(); } - [Test, Pairwise] - public void ThreeRegisterTable_V_8B_16B([ValueSource(nameof(_ThreeRegisterTable_V_8B_16B_))] uint opcodes, - [Values(0u)] uint rd, - [Values(1u)] uint rn, - [Values(4u)] uint rm, - [ValueSource(nameof(_8B_))] ulong z, - [ValueSource(nameof(_8B_))] ulong table0, - [ValueSource(nameof(_8B_))] ulong table1, - [ValueSource(nameof(_8B_))] ulong table2, - [ValueSource(nameof(_GenIdxsForTbl3_))] ulong indexes, - [Values(0b0u, 0b1u)] uint q) // <8B, 16B> + private static readonly uint[] _testData_Three_rm = + { + 4u, + }; + + public static readonly MatrixTheoryData TestData_Three = + new(_TwoRegisterTable_V_8B_16B_(), _testData_rd, _testData_rn, _testData_Three_rm, _8B_(), _8B_(), _8B_(), _8B_(), _GenIdxsForTbl3_(), _testData_q); + + [Theory] + [MemberData(nameof(TestData_Three))] + public void ThreeRegisterTable_V_8B_16B(uint opcodes, uint rd, uint rn, uint rm, ulong z, ulong table0, ulong table1, ulong table2, ulong indexes, uint q) { opcodes |= ((rm & 31) << 16) | ((rn & 31) << 5) | ((rd & 31) << 0); opcodes |= ((q & 1) << 30); @@ -231,17 +257,21 @@ namespace Ryujinx.Tests.Cpu CompareAgainstUnicorn(); } - [Test, Pairwise] - public void Mod_ThreeRegisterTable_V_8B_16B([ValueSource(nameof(_ThreeRegisterTable_V_8B_16B_))] uint opcodes, - [Values(30u, 2u)] uint rd, - [Values(31u)] uint rn, - [Values(2u, 30u)] uint rm, - [ValueSource(nameof(_8B_))] ulong z, - [ValueSource(nameof(_8B_))] ulong table0, - [ValueSource(nameof(_8B_))] ulong table1, - [ValueSource(nameof(_8B_))] ulong table2, - [ValueSource(nameof(_GenIdxsForTbl3_))] ulong indexes, - [Values(0b0u, 0b1u)] uint q) // <8B, 16B> + private static readonly uint[] _testData_ModThree_rd = + { + 30u, 2u, + }; + private static readonly uint[] _testData_ModThree_rm = + { + 2u, 30u, + }; + + public static readonly MatrixTheoryData TestData_ModThree = + new(_ThreeRegisterTable_V_8B_16B_(), _testData_ModThree_rd, _testData_ModTwo_rn, _testData_ModThree_rm, _8B_(), _8B_(), _8B_(), _8B_(), _GenIdxsForTbl3_(), _testData_q); + + [Theory] + [MemberData(nameof(TestData_ModThree))] + public void Mod_ThreeRegisterTable_V_8B_16B(uint opcodes, uint rd, uint rn, uint rm, ulong z, ulong table0, ulong table1, ulong table2, ulong indexes, uint q) { opcodes |= ((rm & 31) << 16) | ((rn & 31) << 5) | ((rd & 31) << 0); opcodes |= ((q & 1) << 30); @@ -257,18 +287,17 @@ namespace Ryujinx.Tests.Cpu CompareAgainstUnicorn(); } - [Test, Pairwise] - public void FourRegisterTable_V_8B_16B([ValueSource(nameof(_FourRegisterTable_V_8B_16B_))] uint opcodes, - [Values(0u)] uint rd, - [Values(1u)] uint rn, - [Values(5u)] uint rm, - [ValueSource(nameof(_8B_))] ulong z, - [ValueSource(nameof(_8B_))] ulong table0, - [ValueSource(nameof(_8B_))] ulong table1, - [ValueSource(nameof(_8B_))] ulong table2, - [ValueSource(nameof(_8B_))] ulong table3, - [ValueSource(nameof(_GenIdxsForTbl4_))] ulong indexes, - [Values(0b0u, 0b1u)] uint q) // <8B, 16B> + private static readonly uint[] _testData_Four_rm = + { + 5u, + }; + + public static readonly MatrixTheoryData TestData_Four = + new(_FourRegisterTable_V_8B_16B_(), _testData_rd, _testData_rn, _testData_Four_rm, _8B_(), _8B_(), _8B_(), _8B_(), _8B_(), _GenIdxsForTbl4_(), _testData_q); + + [Theory] + [MemberData(nameof(TestData_Four))] + public void FourRegisterTable_V_8B_16B(uint opcodes, uint rd, uint rn, uint rm, ulong z, ulong table0, ulong table1, ulong table2, ulong table3, ulong indexes, uint q) { opcodes |= ((rm & 31) << 16) | ((rn & 31) << 5) | ((rd & 31) << 0); opcodes |= ((q & 1) << 30); @@ -285,18 +314,21 @@ namespace Ryujinx.Tests.Cpu CompareAgainstUnicorn(); } - [Test, Pairwise] - public void Mod_FourRegisterTable_V_8B_16B([ValueSource(nameof(_FourRegisterTable_V_8B_16B_))] uint opcodes, - [Values(30u, 3u)] uint rd, - [Values(31u)] uint rn, - [Values(3u, 30u)] uint rm, - [ValueSource(nameof(_8B_))] ulong z, - [ValueSource(nameof(_8B_))] ulong table0, - [ValueSource(nameof(_8B_))] ulong table1, - [ValueSource(nameof(_8B_))] ulong table2, - [ValueSource(nameof(_8B_))] ulong table3, - [ValueSource(nameof(_GenIdxsForTbl4_))] ulong indexes, - [Values(0b0u, 0b1u)] uint q) // <8B, 16B> + private static readonly uint[] _testData_ModFour_rd = + { + 30u, 3u, + }; + private static readonly uint[] _testData_ModFour_rm = + { + 3u, 30u, + }; + + public static readonly MatrixTheoryData TestData_ModFour = + new(_FourRegisterTable_V_8B_16B_(), _testData_ModFour_rd, _testData_ModTwo_rn, _testData_ModFour_rm, _8B_(), _8B_(), _8B_(), _8B_(), _8B_(), _GenIdxsForTbl4_(), _testData_q); + + [Theory] + [MemberData(nameof(TestData_ModFour))] + public void Mod_FourRegisterTable_V_8B_16B(uint opcodes, uint rd, uint rn, uint rm, ulong z, ulong table0, ulong table1, ulong table2, ulong table3, ulong indexes, uint q) { opcodes |= ((rm & 31) << 16) | ((rn & 31) << 5) | ((rd & 31) << 0); opcodes |= ((q & 1) << 30);