aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Tests/Cpu
diff options
context:
space:
mode:
authorPiyachet Kanda <piyachetk@gmail.com>2021-12-09 03:05:59 +0700
committerGitHub <noreply@github.com>2021-12-08 17:05:59 -0300
commit3e2f89b4fd863e7052721e735036fc24fd740b40 (patch)
treeae28177844d9c138a89f8c3ef4068b1efb773c7a /Ryujinx.Tests/Cpu
parentacc0b0f3138b0ea4d573db5152927026c29bd61d (diff)
Implement UHADD8 instruction (#2908)
* Implement UHADD8 instruction along with a test unit * Update PTC revision number
Diffstat (limited to 'Ryujinx.Tests/Cpu')
-rw-r--r--Ryujinx.Tests/Cpu/CpuTestAlu32.cs19
1 files changed, 19 insertions, 0 deletions
diff --git a/Ryujinx.Tests/Cpu/CpuTestAlu32.cs b/Ryujinx.Tests/Cpu/CpuTestAlu32.cs
index c21bbe10..1867e27f 100644
--- a/Ryujinx.Tests/Cpu/CpuTestAlu32.cs
+++ b/Ryujinx.Tests/Cpu/CpuTestAlu32.cs
@@ -111,6 +111,25 @@ namespace Ryujinx.Tests.Cpu
CompareAgainstUnicorn();
}
+
+ [Test, Pairwise]
+ public void Uhadd8([Values(0u, 0xdu)] uint rd,
+ [Values(1u)] uint rm,
+ [Values(2u)] uint rn,
+ [Random(RndCnt)] uint w0,
+ [Random(RndCnt)] uint w1,
+ [Random(RndCnt)] uint w2)
+ {
+ uint opcode = 0xE6700F90u; //UHADD8 R0, R0, R0
+
+ opcode |= ((rm & 15) << 0) | ((rd & 15) << 12) | ((rn & 15) << 16);
+
+ uint sp = TestContext.CurrentContext.Random.NextUInt();
+
+ SingleOpcode(opcode, r0: w0, r1: w1, r2: w2, sp: sp);
+
+ CompareAgainstUnicorn();
+ }
#endif
}
}