aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Tests/Cpu/CpuTestScalar.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.Tests/Cpu/CpuTestScalar.cs')
-rw-r--r--Ryujinx.Tests/Cpu/CpuTestScalar.cs15
1 files changed, 11 insertions, 4 deletions
diff --git a/Ryujinx.Tests/Cpu/CpuTestScalar.cs b/Ryujinx.Tests/Cpu/CpuTestScalar.cs
index c7c3aa05..d1a0c313 100644
--- a/Ryujinx.Tests/Cpu/CpuTestScalar.cs
+++ b/Ryujinx.Tests/Cpu/CpuTestScalar.cs
@@ -1,6 +1,9 @@
using ChocolArm64.State;
+
using NUnit.Framework;
+using System.Runtime.Intrinsics.X86;
+
namespace Ryujinx.Tests.Cpu
{
public class CpuTestScalar : CpuTest
@@ -25,8 +28,10 @@ namespace Ryujinx.Tests.Cpu
public void Fmax_S(uint Opcode, ulong A, ulong B, ulong Result)
{
// FMAX S0, S1, S2
- AThreadState ThreadState = SingleOpcode(Opcode, V1: new AVec { X0 = A }, V2: new AVec { X0 = B });
- Assert.AreEqual(Result, ThreadState.V0.X0);
+ AThreadState ThreadState = SingleOpcode(Opcode,
+ V1: Sse.StaticCast<ulong, float>(Sse2.SetVector128(0, A)),
+ V2: Sse.StaticCast<ulong, float>(Sse2.SetVector128(0, B)));
+ Assert.AreEqual(Result, Sse41.Extract(Sse.StaticCast<float, ulong>(ThreadState.V0), 0));
}
[TestCase(0x1E225820u, 0x0000000000000000ul, 0x0000000080000000ul, 0x0000000080000000ul)]
@@ -49,8 +54,10 @@ namespace Ryujinx.Tests.Cpu
public void Fmin_S(uint Opcode, ulong A, ulong B, ulong Result)
{
// FMIN S0, S1, S2
- AThreadState ThreadState = SingleOpcode(Opcode, V1: new AVec { X0 = A }, V2: new AVec { X0 = B });
- Assert.AreEqual(Result, ThreadState.V0.X0);
+ AThreadState ThreadState = SingleOpcode(Opcode,
+ V1: Sse.StaticCast<ulong, float>(Sse2.SetVector128(0, A)),
+ V2: Sse.StaticCast<ulong, float>(Sse2.SetVector128(0, B)));
+ Assert.AreEqual(Result, Sse41.Extract(Sse.StaticCast<float, ulong>(ThreadState.V0), 0));
}
}
}