From 950693e5c6132bd511e688f0a9ead33f8b7e681b Mon Sep 17 00:00:00 2001 From: LDj3SNuD <35856442+LDj3SNuD@users.noreply.github.com> Date: Thu, 1 Nov 2018 02:56:34 +0100 Subject: [PATCH] Remove unused using. FZ update. --- Ryujinx.Tests/Cpu/CpuTestSimdRegElemF.cs | 58 ++++++++++++++++-------- 1 file changed, 40 insertions(+), 18 deletions(-) diff --git a/Ryujinx.Tests/Cpu/CpuTestSimdRegElemF.cs b/Ryujinx.Tests/Cpu/CpuTestSimdRegElemF.cs index 11f00bac76..51027195bb 100644 --- a/Ryujinx.Tests/Cpu/CpuTestSimdRegElemF.cs +++ b/Ryujinx.Tests/Cpu/CpuTestSimdRegElemF.cs @@ -1,7 +1,5 @@ #define SimdRegElemF -using ChocolArm64.State; - using NUnit.Framework; using System.Collections.Generic; @@ -236,11 +234,14 @@ namespace Ryujinx.Tests.Cpu Vector128 v1 = MakeVectorE0(a); Vector128 v2 = MakeVectorE0E1(b, b * h); - int fpcr = (int)TestContext.CurrentContext.Random.NextUInt() & (1 << (int)Fpcr.Dn); + int rnd = (int)TestContext.CurrentContext.Random.NextUInt(); + + int fpcr = rnd & (1 << (int)Fpcr.Fz); + fpcr |= rnd & (1 << (int)Fpcr.Dn); SingleOpcode(opcodes, v0: v0, v1: v1, v2: v2, fpcr: fpcr); - CompareAgainstUnicorn(Fpsr.Ioc, FpSkips.IfUnderflow, FpTolerances.UpToOneUlpsS); + CompareAgainstUnicorn(Fpsr.Ioc | Fpsr.Idc, FpSkips.IfUnderflow, FpTolerances.UpToOneUlpsS); } [Test, Pairwise] [Explicit] // Fused. @@ -258,11 +259,14 @@ namespace Ryujinx.Tests.Cpu Vector128 v1 = MakeVectorE0(a); Vector128 v2 = MakeVectorE0E1(b, b * h); - int fpcr = (int)TestContext.CurrentContext.Random.NextUInt() & (1 << (int)Fpcr.Dn); + int rnd = (int)TestContext.CurrentContext.Random.NextUInt(); + + int fpcr = rnd & (1 << (int)Fpcr.Fz); + fpcr |= rnd & (1 << (int)Fpcr.Dn); SingleOpcode(opcodes, v0: v0, v1: v1, v2: v2, fpcr: fpcr); - CompareAgainstUnicorn(Fpsr.Ioc, FpSkips.IfUnderflow, FpTolerances.UpToOneUlpsD); + CompareAgainstUnicorn(Fpsr.Ioc | Fpsr.Idc, FpSkips.IfUnderflow, FpTolerances.UpToOneUlpsD); } [Test, Pairwise] [Explicit] // Fused. @@ -287,11 +291,14 @@ namespace Ryujinx.Tests.Cpu Vector128 v1 = MakeVectorE0E1(a, a * q); Vector128 v2 = MakeVectorE0E1(b, b * h); - int fpcr = (int)TestContext.CurrentContext.Random.NextUInt() & (1 << (int)Fpcr.Dn); + int rnd = (int)TestContext.CurrentContext.Random.NextUInt(); + + int fpcr = rnd & (1 << (int)Fpcr.Fz); + fpcr |= rnd & (1 << (int)Fpcr.Dn); SingleOpcode(opcodes, v0: v0, v1: v1, v2: v2, fpcr: fpcr); - CompareAgainstUnicorn(Fpsr.Ioc, FpSkips.IfUnderflow, FpTolerances.UpToOneUlpsS); + CompareAgainstUnicorn(Fpsr.Ioc | Fpsr.Idc, FpSkips.IfUnderflow, FpTolerances.UpToOneUlpsS); } [Test, Pairwise] [Explicit] // Fused. @@ -313,11 +320,14 @@ namespace Ryujinx.Tests.Cpu Vector128 v1 = MakeVectorE0E1(a, a); Vector128 v2 = MakeVectorE0E1(b, b * h); - int fpcr = (int)TestContext.CurrentContext.Random.NextUInt() & (1 << (int)Fpcr.Dn); + int rnd = (int)TestContext.CurrentContext.Random.NextUInt(); + + int fpcr = rnd & (1 << (int)Fpcr.Fz); + fpcr |= rnd & (1 << (int)Fpcr.Dn); SingleOpcode(opcodes, v0: v0, v1: v1, v2: v2, fpcr: fpcr); - CompareAgainstUnicorn(Fpsr.Ioc, FpSkips.IfUnderflow, FpTolerances.UpToOneUlpsD); + CompareAgainstUnicorn(Fpsr.Ioc | Fpsr.Idc, FpSkips.IfUnderflow, FpTolerances.UpToOneUlpsD); } [Test, Pairwise] [Explicit] @@ -336,11 +346,14 @@ namespace Ryujinx.Tests.Cpu Vector128 v1 = MakeVectorE0(a); Vector128 v2 = MakeVectorE0E1(b, b * h); - int fpcr = (int)TestContext.CurrentContext.Random.NextUInt() & (1 << (int)Fpcr.Dn); + int rnd = (int)TestContext.CurrentContext.Random.NextUInt(); + + int fpcr = rnd & (1 << (int)Fpcr.Fz); + fpcr |= rnd & (1 << (int)Fpcr.Dn); SingleOpcode(opcodes, v0: v0, v1: v1, v2: v2, fpcr: fpcr); - CompareAgainstUnicorn(fpsrMask: Fpsr.Ioc); + CompareAgainstUnicorn(fpsrMask: Fpsr.Ioc | Fpsr.Idc); } [Test, Pairwise] [Explicit] @@ -358,11 +371,14 @@ namespace Ryujinx.Tests.Cpu Vector128 v1 = MakeVectorE0(a); Vector128 v2 = MakeVectorE0E1(b, b * h); - int fpcr = (int)TestContext.CurrentContext.Random.NextUInt() & (1 << (int)Fpcr.Dn); + int rnd = (int)TestContext.CurrentContext.Random.NextUInt(); + + int fpcr = rnd & (1 << (int)Fpcr.Fz); + fpcr |= rnd & (1 << (int)Fpcr.Dn); SingleOpcode(opcodes, v0: v0, v1: v1, v2: v2, fpcr: fpcr); - CompareAgainstUnicorn(fpsrMask: Fpsr.Ioc); + CompareAgainstUnicorn(fpsrMask: Fpsr.Ioc | Fpsr.Idc); } [Test, Pairwise] [Explicit] @@ -387,11 +403,14 @@ namespace Ryujinx.Tests.Cpu Vector128 v1 = MakeVectorE0E1(a, a * q); Vector128 v2 = MakeVectorE0E1(b, b * h); - int fpcr = (int)TestContext.CurrentContext.Random.NextUInt() & (1 << (int)Fpcr.Dn); + int rnd = (int)TestContext.CurrentContext.Random.NextUInt(); + + int fpcr = rnd & (1 << (int)Fpcr.Fz); + fpcr |= rnd & (1 << (int)Fpcr.Dn); SingleOpcode(opcodes, v0: v0, v1: v1, v2: v2, fpcr: fpcr); - CompareAgainstUnicorn(fpsrMask: Fpsr.Ioc); + CompareAgainstUnicorn(fpsrMask: Fpsr.Ioc | Fpsr.Idc); } [Test, Pairwise] [Explicit] @@ -413,11 +432,14 @@ namespace Ryujinx.Tests.Cpu Vector128 v1 = MakeVectorE0E1(a, a); Vector128 v2 = MakeVectorE0E1(b, b * h); - int fpcr = (int)TestContext.CurrentContext.Random.NextUInt() & (1 << (int)Fpcr.Dn); + int rnd = (int)TestContext.CurrentContext.Random.NextUInt(); + + int fpcr = rnd & (1 << (int)Fpcr.Fz); + fpcr |= rnd & (1 << (int)Fpcr.Dn); SingleOpcode(opcodes, v0: v0, v1: v1, v2: v2, fpcr: fpcr); - CompareAgainstUnicorn(fpsrMask: Fpsr.Ioc); + CompareAgainstUnicorn(fpsrMask: Fpsr.Ioc | Fpsr.Idc); } #endif }