diff options
author | iximeow <me@iximeow.net> | 2022-05-07 09:40:26 -0700 |
---|---|---|
committer | iximeow <me@iximeow.net> | 2022-05-07 09:40:26 -0700 |
commit | 8ce99ef32e1db656138bb95ab57506100ffd6fdd (patch) | |
tree | 947570523e0212739fe15ce4dead8f84e1c668ba /test/long_mode/descriptions.rs | |
parent | d58bfcb1ba2ceee1abe368ba81d31240e711d215 (diff) |
more annotation fixes?
Diffstat (limited to 'test/long_mode/descriptions.rs')
-rw-r--r-- | test/long_mode/descriptions.rs | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/test/long_mode/descriptions.rs b/test/long_mode/descriptions.rs index fc53acb..c319e0b 100644 --- a/test/long_mode/descriptions.rs +++ b/test/long_mode/descriptions.rs @@ -288,8 +288,8 @@ fn test_modrm_decode() { desc.to_string().contains("register number") && desc.to_string().contains("mod bits: 11") }), -// AnnotationCheck::exact(8, 10, InnerDescription::RegisterNumber("mmm", 0, RegSpec::eax())), -// AnnotationCheck::no_extra(), + AnnotationCheck::exact(8, 10, InnerDescription::RegisterNumber("mmm", 0, RegSpec::eax())), + AnnotationCheck::no_extra(), ]); test_annotations(&[0xc1, 0xe0, 0x03], "shl eax, 0x3", &[ AnnotationCheck::exact(11, 13, InnerDescription::Opcode(Opcode::SHL)), @@ -303,7 +303,6 @@ fn test_modrm_decode() { AnnotationCheck::exact(8, 10, InnerDescription::RegisterNumber("mmm", 0, RegSpec::eax())), AnnotationCheck::no_extra(), ]); - // just modrm test_annotations(&[0x33, 0x08], "xor ecx, dword [rax]", &[ AnnotationCheck::exact(0, 7, InnerDescription::Opcode(Opcode::XOR)), AnnotationCheck::approximate(0, 7, |desc| { desc.to_string() == "operand code `Gv_Ev`" }), @@ -316,6 +315,16 @@ fn test_modrm_decode() { AnnotationCheck::exact(8, 10, InnerDescription::RegisterNumber("mmm", 0, RegSpec::rax())), AnnotationCheck::no_extra(), ]); + test_annotations(&[0x66, 0x0f, 0x38, 0x00, 0xc1], "pshufb xmm0, xmm1", &[ + AnnotationCheck::exact(0, 7, InnerDescription::Misc("operand size override (to 16 bits)")), + AnnotationCheck::approximate(38, 39, |desc| { + desc.to_string().contains("mmm") && + desc.to_string().contains("register number") && + desc.to_string().contains("mod bits: 11") + }), + AnnotationCheck::exact(32, 34, InnerDescription::RegisterNumber("mmm", 1, RegSpec::ecx())), + AnnotationCheck::no_extra(), + ]); // modrm + rex.w test_annotations(&[0x48, 0x33, 0x08], "xor rcx, qword [rax]", &[]); |