aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Tests/Cpu/CpuTestSimdCvt32.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.Tests/Cpu/CpuTestSimdCvt32.cs')
-rw-r--r--Ryujinx.Tests/Cpu/CpuTestSimdCvt32.cs37
1 files changed, 37 insertions, 0 deletions
diff --git a/Ryujinx.Tests/Cpu/CpuTestSimdCvt32.cs b/Ryujinx.Tests/Cpu/CpuTestSimdCvt32.cs
index c25f2fa2..565d231a 100644
--- a/Ryujinx.Tests/Cpu/CpuTestSimdCvt32.cs
+++ b/Ryujinx.Tests/Cpu/CpuTestSimdCvt32.cs
@@ -2,6 +2,7 @@
using ARMeilleure.State;
using NUnit.Framework;
+using System;
using System.Collections.Generic;
namespace Ryujinx.Tests.Cpu
@@ -215,6 +216,42 @@ namespace Ryujinx.Tests.Cpu
CompareAgainstUnicorn();
}
+
+ [Test, Pairwise, Description("VRINTX.F<size> <Sd>, <Sm>")]
+ public void Vrintx_S([Values(0u, 1u)] uint rd,
+ [Values(0u, 1u)] uint rm,
+ [Values(2u, 3u)] uint size,
+ [ValueSource(nameof(_1D_F_))] ulong s0,
+ [ValueSource(nameof(_1D_F_))] ulong s1,
+ [ValueSource(nameof(_1D_F_))] ulong s2,
+ [Values(RMode.Rn, RMode.Rm, RMode.Rp)] RMode rMode)
+ {
+ uint opcode = 0xEB70A40;
+ V128 v0, v1, v2;
+ if (size == 2)
+ {
+ opcode |= ((rm & 0x1e) >> 1) | ((rm & 0x1) << 5);
+ opcode |= ((rd & 0x1e) >> 11) | ((rm & 0x1) << 22);
+ v0 = MakeVectorE0E1((uint)BitConverter.SingleToInt32Bits(s0), (uint)BitConverter.SingleToInt32Bits(s0));
+ v1 = MakeVectorE0E1((uint)BitConverter.SingleToInt32Bits(s1), (uint)BitConverter.SingleToInt32Bits(s0));
+ v2 = MakeVectorE0E1((uint)BitConverter.SingleToInt32Bits(s2), (uint)BitConverter.SingleToInt32Bits(s1));
+ }
+ else
+ {
+ opcode |= ((rm & 0xf) << 0) | ((rd & 0x10) << 1);
+ opcode |= ((rd & 0xf) << 12) | ((rd & 0x10) << 18);
+ v0 = MakeVectorE0E1((uint)BitConverter.DoubleToInt64Bits(s0), (uint)BitConverter.DoubleToInt64Bits(s0));
+ v1 = MakeVectorE0E1((uint)BitConverter.DoubleToInt64Bits(s1), (uint)BitConverter.DoubleToInt64Bits(s0));
+ v2 = MakeVectorE0E1((uint)BitConverter.DoubleToInt64Bits(s2), (uint)BitConverter.DoubleToInt64Bits(s1));
+ }
+
+ opcode |= ((size & 3) << 8);
+
+ int fpscr = (int)rMode << (int)Fpcr.RMode;
+ SingleOpcode(opcode, v0: v0, v1: v1, v2: v2, fpscr: fpscr);
+
+ CompareAgainstUnicorn();
+ }
#endif
}
}