From b577312dd61edaac2551794578ace22287031bdb Mon Sep 17 00:00:00 2001 From: iximeow Date: Sat, 28 Jan 2023 18:15:07 -0800 Subject: 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. --- test/long_mode/mod.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test') 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] -- cgit v1.1