2018-02-18 23:17:26 -05:00
|
|
|
using ChocolArm64.State;
|
|
|
|
using NUnit.Framework;
|
|
|
|
|
|
|
|
namespace Ryujinx.Tests.Cpu
|
|
|
|
{
|
2018-02-23 07:29:20 -05:00
|
|
|
public class CpuTestScalar : CpuTest
|
2018-02-18 23:17:26 -05:00
|
|
|
{
|
|
|
|
[TestCase(0x00000000u, 0x80000000u, 0x00000000u)]
|
|
|
|
[TestCase(0x80000000u, 0x00000000u, 0x00000000u)]
|
|
|
|
[TestCase(0x80000000u, 0x80000000u, 0x80000000u)]
|
|
|
|
[TestCase(0x3DCCCCCDu, 0x3C9623B1u, 0x3DCCCCCDu)]
|
|
|
|
[TestCase(0x8BA98D27u, 0x00000076u, 0x00000076u)]
|
|
|
|
[TestCase(0x807FFFFFu, 0x7F7FFFFFu, 0x7F7FFFFFu)]
|
|
|
|
[TestCase(0x7F7FFFFFu, 0x807FFFFFu, 0x7F7FFFFFu)]
|
|
|
|
[TestCase(0x7FC00000u, 0x3F800000u, 0x7FC00000u)]
|
|
|
|
[TestCase(0x3F800000u, 0x7FC00000u, 0x7FC00000u)]
|
2018-03-23 06:40:23 -04:00
|
|
|
[TestCase(0x7F800001u, 0x7FC00042u, 0x7FC00001u, Ignore = "NaN test.")]
|
|
|
|
[TestCase(0x7FC00042u, 0x7F800001u, 0x7FC00001u, Ignore = "NaN test.")]
|
|
|
|
[TestCase(0x7FC0000Au, 0x7FC0000Bu, 0x7FC0000Au, Ignore = "NaN test.")]
|
2018-02-18 23:17:26 -05:00
|
|
|
public void Fmax_S(uint A, uint B, uint Result)
|
|
|
|
{
|
|
|
|
// FMAX S0, S1, S2
|
|
|
|
uint Opcode = 0x1E224820;
|
|
|
|
AThreadState ThreadState = SingleOpcode(Opcode, V1: new AVec { W0 = A }, V2: new AVec { W0 = B });
|
|
|
|
Assert.AreEqual(Result, ThreadState.V0.W0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|