Test Cleanup
This commit is contained in:
parent
71d5043029
commit
77c48c2a8d
7 changed files with 231 additions and 240 deletions
|
@ -251,7 +251,7 @@ namespace Ryujinx.Tests.Cpu
|
|||
}
|
||||
opcode |= (uint)imm & 0xff;
|
||||
|
||||
SingleOpcode(opcode, r0: 0x2500); //correct
|
||||
SingleOpcode(opcode, r0: 0x2500);
|
||||
|
||||
CompareAgainstUnicorn();
|
||||
}
|
||||
|
@ -288,7 +288,7 @@ namespace Ryujinx.Tests.Cpu
|
|||
|
||||
(V128 vec1, V128 vec2, _, _) = GenerateTestVectors();
|
||||
|
||||
SingleOpcode(opcode, r0: 0x2500, v0: vec1, v1: vec2); //correct
|
||||
SingleOpcode(opcode, r0: 0x2500, v0: vec1, v1: vec2);
|
||||
|
||||
CompareAgainstUnicorn();
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ namespace Ryujinx.Tests.Cpu
|
|||
opcode |= ((vd & 0x10) << 18);
|
||||
opcode |= ((vd & 0xf) << 12);
|
||||
|
||||
SingleOpcode(opcode); //correct
|
||||
SingleOpcode(opcode);
|
||||
|
||||
CompareAgainstUnicorn();
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ namespace Ryujinx.Tests.Cpu
|
|||
[Values(0u, 1u, 2u, 3u)] uint vd,
|
||||
[Values(0x0u)] [Random(0u, 0xffu, RndCntImm)] uint imm)
|
||||
{
|
||||
uint opcode = 0xeeb00800; // invalid
|
||||
uint opcode = 0xeeb00800;
|
||||
opcode |= (size & 3) << 8;
|
||||
opcode |= (imm & 0xf) | ((imm & 0xf0) << 12);
|
||||
|
||||
|
@ -79,7 +79,7 @@ namespace Ryujinx.Tests.Cpu
|
|||
opcode |= ((vd & 0xf) << 12);
|
||||
}
|
||||
|
||||
SingleOpcode(opcode); //correct
|
||||
SingleOpcode(opcode);
|
||||
|
||||
CompareAgainstUnicorn();
|
||||
}
|
||||
|
@ -216,7 +216,7 @@ namespace Ryujinx.Tests.Cpu
|
|||
V128 v2 = new V128(TestContext.CurrentContext.Random.NextULong(), TestContext.CurrentContext.Random.NextULong());
|
||||
V128 v3 = new V128(TestContext.CurrentContext.Random.NextULong(), TestContext.CurrentContext.Random.NextULong());
|
||||
|
||||
SingleOpcode(opcode, v0: v0, v1: v1, v2: v2, v3: v3); //correct
|
||||
SingleOpcode(opcode, v0: v0, v1: v1, v2: v2, v3: v3);
|
||||
|
||||
CompareAgainstUnicorn();
|
||||
}
|
||||
|
@ -246,7 +246,7 @@ namespace Ryujinx.Tests.Cpu
|
|||
V128 v2 = new V128(TestContext.CurrentContext.Random.NextULong(), TestContext.CurrentContext.Random.NextULong());
|
||||
V128 v3 = new V128(TestContext.CurrentContext.Random.NextULong(), TestContext.CurrentContext.Random.NextULong());
|
||||
|
||||
SingleOpcode(opcode, v0: v0, v1: v1, v2: v2, v3: v3); //correct
|
||||
SingleOpcode(opcode, v0: v0, v1: v1, v2: v2, v3: v3);
|
||||
|
||||
CompareAgainstUnicorn();
|
||||
}
|
||||
|
@ -276,7 +276,7 @@ namespace Ryujinx.Tests.Cpu
|
|||
V128 v2 = new V128(TestContext.CurrentContext.Random.NextULong(), TestContext.CurrentContext.Random.NextULong());
|
||||
V128 v3 = new V128(TestContext.CurrentContext.Random.NextULong(), TestContext.CurrentContext.Random.NextULong());
|
||||
|
||||
SingleOpcode(opcode, v0: v0, v1: v1, v2: v2, v3: v3); //correct
|
||||
SingleOpcode(opcode, v0: v0, v1: v1, v2: v2, v3: v3);
|
||||
|
||||
CompareAgainstUnicorn();
|
||||
}
|
||||
|
@ -322,7 +322,7 @@ namespace Ryujinx.Tests.Cpu
|
|||
V128 v0 = new V128(b0);
|
||||
V128 v1 = new V128(b1);
|
||||
|
||||
SingleOpcode(opcode, v0: v0, v1: v1, v2: v2, v3: v3, v4: v4, v5: v5); //correct
|
||||
SingleOpcode(opcode, v0: v0, v1: v1, v2: v2, v3: v3, v4: v4, v5: v5);
|
||||
|
||||
CompareAgainstUnicorn();
|
||||
}
|
||||
|
@ -355,7 +355,7 @@ namespace Ryujinx.Tests.Cpu
|
|||
V128 v2 = new V128(TestContext.CurrentContext.Random.NextULong(), TestContext.CurrentContext.Random.NextULong());
|
||||
V128 v3 = new V128(TestContext.CurrentContext.Random.NextULong(), TestContext.CurrentContext.Random.NextULong());
|
||||
|
||||
SingleOpcode(opcode, v0: v0, v1: v1, v2: v2, v3: v3); //correct
|
||||
SingleOpcode(opcode, v0: v0, v1: v1, v2: v2, v3: v3);
|
||||
|
||||
CompareAgainstUnicorn();
|
||||
}
|
||||
|
|
|
@ -259,6 +259,7 @@ namespace Ryujinx.Tests.Cpu
|
|||
opcode |= ((rm & 0x1e) >> 1) | ((rm & 0x1) << 5);
|
||||
opcode |= ((rd & 0x1e) << 11) | ((rd & 0x1) << 22);
|
||||
}
|
||||
|
||||
opcode |= ((size & 3) << 8);
|
||||
if (e) opcode |= 1 << 7;
|
||||
|
||||
|
@ -317,22 +318,12 @@ namespace Ryujinx.Tests.Cpu
|
|||
[Range(0u, 7u)] uint rn,
|
||||
[Range(0u, 7u)] uint rm)
|
||||
{
|
||||
uint opcode = 0xf3000d00; // VADD.f32 D0, D0, D0
|
||||
/*
|
||||
if (q)
|
||||
{
|
||||
rm <<= 0x1e;
|
||||
rn <<= 0x1e;
|
||||
rd <<= 0x1e;
|
||||
}
|
||||
*/
|
||||
uint opcode = 0xf3000d00;
|
||||
|
||||
opcode |= ((rm & 0xf) << 0) | ((rm & 0x10) << 1);
|
||||
opcode |= ((rd & 0xf) << 12) | ((rd & 0x10) << 18);
|
||||
opcode |= ((rn & 0xf) << 16) | ((rn & 0x10) << 3);
|
||||
|
||||
//if (q) opcode |= 1 << 6;
|
||||
|
||||
var rnd = TestContext.CurrentContext.Random;
|
||||
V128 v0 = new V128(rnd.NextFloat(int.MinValue, int.MaxValue), rnd.NextFloat(int.MinValue, int.MaxValue), rnd.NextFloat(int.MinValue, int.MaxValue), rnd.NextFloat(int.MinValue, int.MaxValue));
|
||||
V128 v1 = new V128(rnd.NextFloat(int.MinValue, int.MaxValue), rnd.NextFloat(int.MinValue, int.MaxValue), rnd.NextFloat(int.MinValue, int.MaxValue), rnd.NextFloat(int.MinValue, int.MaxValue));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue