diff options
author | Liam <[email protected]> | 2022-11-16 16:10:39 -0500 |
---|---|---|
committer | Liam <[email protected]> | 2022-12-03 11:16:26 -0500 |
commit | 16101049f3511b5ccb3b24dd383f8d8e498b0270 (patch) | |
tree | 48a0a9328e9df8617c38b97c8cc4294adb997667 /tests | |
parent | 7791d3d8548c6e5885990e3e66438f3cb5272c13 (diff) | |
download | dynarmic-16101049f3511b5ccb3b24dd383f8d8e498b0270.tar.gz dynarmic-16101049f3511b5ccb3b24dd383f8d8e498b0270.zip |
Fix EXTR (flipped rgister order)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/A64/a64.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/A64/a64.cpp b/tests/A64/a64.cpp index 067da6bb..6190ae14 100644 --- a/tests/A64/a64.cpp +++ b/tests/A64/a64.cpp @@ -1024,6 +1024,23 @@ TEST_CASE("A64: This is an infinite loop if fast dispatch is enabled", "[a64]") jit.Run(); } +TEST_CASE("A64: EXTR", "[a64]") { + A64TestEnv env; + A64::Jit jit{A64::UserConfig{&env}}; + + env.code_mem.emplace_back(0x93d8fef7); // EXTR X23, X23, X24, #63 + env.code_mem.emplace_back(0x14000000); // B . + + jit.SetPC(0); + jit.SetRegister(23, 0); + jit.SetRegister(24, 1); + + env.ticks_left = 2; + jit.Run(); + + REQUIRE(jit.GetRegister(23) == 0); +} + TEST_CASE("A64: Optimization failure when folding ADD", "[a64]") { A64TestEnv env; A64::Jit jit{A64::UserConfig{&env}}; |