aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2023-01-28 18:15:07 -0800
committeriximeow <me@iximeow.net>2023-07-04 19:01:38 -0700
commitb577312dd61edaac2551794578ace22287031bdb (patch)
tree9784a41e99b07f54c2b45d375d288d95482c98c9 /test
parent5e7828d03e0cf41a44b541c9da58bea76e1740dc (diff)
fix some dancing between bank size and RegisterBank enum values
in the process, fixed a decoding bug dealing with a0/a1/a2/a3 movs (respected rex.b when rex.b should have been ignored) this seems to maybe improve runtime ever so slightly, but this is really meant as a cleanup commit more than anything.
Diffstat (limited to 'test')
-rw-r--r--test/long_mode/mod.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/long_mode/mod.rs b/test/long_mode/mod.rs
index 12d5f96..5a1d02d 100644
--- a/test/long_mode/mod.rs
+++ b/test/long_mode/mod.rs
@@ -2717,6 +2717,11 @@ fn only_64bit() {
test_display(&[0x67, 0xaf], "scas dword es:[edi], eax");
test_display(&[0x67, 0xac], "lods al, byte ds:[esi]");
test_display(&[0x67, 0xaa], "stos byte es:[edi], al");
+ // note that rax.b does *not* change the register
+ test_display(&[0x4f, 0xa0, 0x12, 0x34, 0x12, 0x34, 0x12, 0x34, 0x12, 0x34], "mov al, byte [0x3412341234123412]");
+ test_display(&[0x4f, 0xa1, 0x12, 0x34, 0x12, 0x34, 0x12, 0x34, 0x12, 0x34], "mov rax, qword [0x3412341234123412]");
+ test_display(&[0x4f, 0xa2, 0x12, 0x34, 0x12, 0x34, 0x12, 0x34, 0x12, 0x34], "mov byte [0x3412341234123412], al");
+ test_display(&[0x4f, 0xa3, 0x12, 0x34, 0x12, 0x34, 0x12, 0x34, 0x12, 0x34], "mov qword [0x3412341234123412], rax");
}
#[test]