aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Tests/Cpu/CpuTestSystem.cs
diff options
context:
space:
mode:
authorTSR Berry <20988865+TSRBerry@users.noreply.github.com>2023-04-08 01:22:00 +0200
committerMary <thog@protonmail.com>2023-04-27 23:51:14 +0200
commitcee712105850ac3385cd0091a923438167433f9f (patch)
tree4a5274b21d8b7f938c0d0ce18736d3f2993b11b1 /Ryujinx.Tests/Cpu/CpuTestSystem.cs
parentcd124bda587ef09668a971fa1cac1c3f0cfc9f21 (diff)
Move solution and projects to src
Diffstat (limited to 'Ryujinx.Tests/Cpu/CpuTestSystem.cs')
-rw-r--r--Ryujinx.Tests/Cpu/CpuTestSystem.cs69
1 files changed, 0 insertions, 69 deletions
diff --git a/Ryujinx.Tests/Cpu/CpuTestSystem.cs b/Ryujinx.Tests/Cpu/CpuTestSystem.cs
deleted file mode 100644
index cb8d9ce1..00000000
--- a/Ryujinx.Tests/Cpu/CpuTestSystem.cs
+++ /dev/null
@@ -1,69 +0,0 @@
-#define System
-
-using ARMeilleure.State;
-using NUnit.Framework;
-using System.Collections.Generic;
-
-namespace Ryujinx.Tests.Cpu
-{
- [Category("System")]
- public sealed class CpuTestSystem : CpuTest
- {
-#if System
-
-#region "ValueSource (Types)"
- private static IEnumerable<ulong> _GenNzcv_()
- {
- yield return 0x0000000000000000ul;
- yield return 0x7FFFFFFFFFFFFFFFul;
- yield return 0x8000000000000000ul;
- yield return 0xFFFFFFFFFFFFFFFFul;
-
- bool v = TestContext.CurrentContext.Random.NextBool();
- bool c = TestContext.CurrentContext.Random.NextBool();
- bool z = TestContext.CurrentContext.Random.NextBool();
- bool n = TestContext.CurrentContext.Random.NextBool();
-
- ulong rnd = 0UL;
-
- rnd |= (v ? 1UL : 0UL) << (int)PState.VFlag;
- rnd |= (c ? 1UL : 0UL) << (int)PState.CFlag;
- rnd |= (z ? 1UL : 0UL) << (int)PState.ZFlag;
- rnd |= (n ? 1UL : 0UL) << (int)PState.NFlag;
-
- yield return rnd;
- }
-#endregion
-
-#region "ValueSource (Opcodes)"
- private static uint[] _MrsMsr_Nzcv_()
- {
- return new[]
- {
- 0xD53B4200u, // MRS X0, NZCV
- 0xD51B4200u // MSR NZCV, X0
- };
- }
-#endregion
-
- [Test, Pairwise]
- public void MrsMsr_Nzcv([ValueSource("_MrsMsr_Nzcv_")] uint opcodes,
- [Values(0u, 1u, 31u)] uint rt,
- [ValueSource("_GenNzcv_")] ulong xt)
- {
- opcodes |= (rt & 31) << 0;
-
- bool v = TestContext.CurrentContext.Random.NextBool();
- bool c = TestContext.CurrentContext.Random.NextBool();
- bool z = TestContext.CurrentContext.Random.NextBool();
- bool n = TestContext.CurrentContext.Random.NextBool();
-
- ulong x31 = TestContext.CurrentContext.Random.NextULong();
-
- SingleOpcode(opcodes, x0: xt, x1: xt, x31: x31, overflow: v, carry: c, zero: z, negative: n);
-
- CompareAgainstUnicorn();
- }
-#endif
- }
-} \ No newline at end of file