tests: add F{MIN,MAX}NM tests
This commit is contained in:
parent
e61e771a5f
commit
a1192a51d8
1 changed files with 44 additions and 0 deletions
|
@ -520,6 +520,50 @@ TEST_CASE("A64: FMAX", "[a64]") {
|
||||||
REQUIRE(jit.GetVector(2) == Vector{0x7fc0000009503366, 0x6e4b0a41ffffffff});
|
REQUIRE(jit.GetVector(2) == Vector{0x7fc0000009503366, 0x6e4b0a41ffffffff});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST_CASE("A64: FMINNM", "[a64]") {
|
||||||
|
A64TestEnv env;
|
||||||
|
A64::Jit jit{A64::UserConfig{&env}};
|
||||||
|
|
||||||
|
env.code_mem.emplace_back(0x4ea1c400); // FMINNM.4S V0, V0, V1
|
||||||
|
env.code_mem.emplace_back(0x4ee3c442); // FMINNM.2D V2, V2, V3
|
||||||
|
env.code_mem.emplace_back(0x14000000); // B .
|
||||||
|
|
||||||
|
jit.SetPC(0);
|
||||||
|
jit.SetVector(0, {0x7fc00000'09503366, 0x00000000'7f984a37});
|
||||||
|
jit.SetVector(1, {0xc1200000'00000001, 0x6e4b0a41'ffffffff});
|
||||||
|
|
||||||
|
jit.SetVector(2, {0x7fc0000009503366, 0x3ff0000000000000});
|
||||||
|
jit.SetVector(3, {0xfff0000000000000, 0xffffffffffffffff});
|
||||||
|
|
||||||
|
env.ticks_left = 2;
|
||||||
|
jit.Run();
|
||||||
|
|
||||||
|
REQUIRE(jit.GetVector(0) == Vector{0xc1200000'00000001, 0x00000000'7fd84a37});
|
||||||
|
REQUIRE(jit.GetVector(2) == Vector{0xfff0000000000000, 0x3ff0000000000000});
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST_CASE("A64: FMAXNM", "[a64]") {
|
||||||
|
A64TestEnv env;
|
||||||
|
A64::Jit jit{A64::UserConfig{&env}};
|
||||||
|
|
||||||
|
env.code_mem.emplace_back(0x4e21c400); // FMAXNM.4S V0, V0, V1
|
||||||
|
env.code_mem.emplace_back(0x4e63c442); // FMAXNM.2D V2, V2, V3
|
||||||
|
env.code_mem.emplace_back(0x14000000); // B .
|
||||||
|
|
||||||
|
jit.SetPC(0);
|
||||||
|
jit.SetVector(0, {0x7fc00000'09503366, 0x00000000'7f984a37});
|
||||||
|
jit.SetVector(1, {0xc1200000'00000001, 0x6e4b0a41'ffffffff});
|
||||||
|
|
||||||
|
jit.SetVector(2, {0x7fc0000009503366, 0x3ff0000000000000});
|
||||||
|
jit.SetVector(3, {0xfff0000000000000, 0xffffffffffffffff});
|
||||||
|
|
||||||
|
env.ticks_left = 2;
|
||||||
|
jit.Run();
|
||||||
|
|
||||||
|
REQUIRE(jit.GetVector(0) == Vector{0xc1200000'09503366, 0x6e4b0a41'7fd84a37});
|
||||||
|
REQUIRE(jit.GetVector(2) == Vector{0x7fc0000009503366, 0x3ff0000000000000});
|
||||||
|
}
|
||||||
|
|
||||||
TEST_CASE("A64: 128-bit exclusive read/write", "[a64]") {
|
TEST_CASE("A64: 128-bit exclusive read/write", "[a64]") {
|
||||||
A64TestEnv env;
|
A64TestEnv env;
|
||||||
ExclusiveMonitor monitor{1};
|
ExclusiveMonitor monitor{1};
|
||||||
|
|
Loading…
Reference in a new issue