Squashed 'external/capstone/' content from commit e46f64fa
git-subtree-dir: external/capstone git-subtree-split: e46f64fadb351e9ecd05264fab26f2772feb0994
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
test_cases:
|
||||
-
|
||||
input:
|
||||
name: "OOB read should be 2 bytes"
|
||||
bytes: [ 0x00 ]
|
||||
arch: "CS_ARCH_SYSTEMZ"
|
||||
options: [ CS_MODE_BIG_ENDIAN ]
|
||||
address: 0x0
|
||||
expected:
|
||||
insns: []
|
||||
-
|
||||
input:
|
||||
name: "OOB read should be 4 bytes"
|
||||
bytes: [ 0xb0, 0xff ]
|
||||
arch: "CS_ARCH_SYSTEMZ"
|
||||
options: [ CS_MODE_BIG_ENDIAN ]
|
||||
address: 0x0
|
||||
expected:
|
||||
insns: []
|
||||
-
|
||||
input:
|
||||
name: "OOB read should be 6 bytes"
|
||||
bytes: [ 0xc0, 0xff, 0xff ]
|
||||
arch: "CS_ARCH_SYSTEMZ"
|
||||
options: [ CS_MODE_BIG_ENDIAN ]
|
||||
address: 0x0
|
||||
expected:
|
||||
insns: []
|
||||
|
||||
-
|
||||
input:
|
||||
name: "WASM truncated memory immediate should fail (#2865)"
|
||||
bytes: [ 0x28, 0x01 ]
|
||||
arch: "wasm"
|
||||
options: [ CS_OPT_DETAIL ]
|
||||
address: 0x0
|
||||
expected:
|
||||
insns: []
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,616 @@
|
||||
test_cases:
|
||||
-
|
||||
input:
|
||||
name: "x86 (16-bit): last mandatory F2/F3 prefix should take priority"
|
||||
bytes: [ 0x66, 0xF2, 0x0F, 0x58, 0xC1 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_MODE_32 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "addsd xmm0, xmm1"
|
||||
-
|
||||
input:
|
||||
name: "x86 (16-bit): last mandatory F2/F3 prefix should take priority"
|
||||
bytes: [ 0xF2, 0x66, 0xF3, 0x0F, 0x58, 0xC1 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_MODE_32 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "addss xmm0, xmm1"
|
||||
-
|
||||
input:
|
||||
name: "x86 (16-bit): last mandatory F2/F3 prefix should take priority"
|
||||
bytes: [ 0xF2, 0x3e, 0x66, 0xF3, 0x2e, 0x66, 0x66, 0x0F, 0x58, 0xC1 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_MODE_32 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "addss xmm0, xmm1"
|
||||
-
|
||||
input:
|
||||
name: "x86 (16-bit): do not ignore mandatory 66 prefix when no mandatory F2/F3 prefix is present"
|
||||
bytes: [ 0x66, 0x3e, 0x0F, 0x58, 0xC1 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_MODE_32 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "addpd xmm0, xmm1"
|
||||
-
|
||||
input:
|
||||
name: "x86 (32-bit): last mandatory F2/F3 prefix should take priority"
|
||||
bytes: [ 0x66, 0xF2, 0x0F, 0x58, 0xC1 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_MODE_32 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "addsd xmm0, xmm1"
|
||||
-
|
||||
input:
|
||||
name: "x86 (32-bit): last mandatory F2/F3 prefix should take priority"
|
||||
bytes: [ 0xF2, 0x66, 0xF3, 0x0F, 0x58, 0xC1 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_MODE_32 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "addss xmm0, xmm1"
|
||||
-
|
||||
input:
|
||||
name: "x86 (32-bit): last mandatory F2/F3 prefix should take priority"
|
||||
bytes: [ 0xF2, 0x3e, 0x66, 0xF3, 0x2e, 0x66, 0x66, 0x0F, 0x58, 0xC1 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_MODE_32 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "addss xmm0, xmm1"
|
||||
-
|
||||
input:
|
||||
name: "x86 (32-bit): do not ignore mandatory 66 prefix when no mandatory F2/F3 prefix is present"
|
||||
bytes: [ 0x66, 0x3e, 0x0F, 0x58, 0xC1 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_MODE_32 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "addpd xmm0, xmm1"
|
||||
-
|
||||
input:
|
||||
name: "x86 (64-bit): last mandatory F2/F3 prefix should take priority"
|
||||
bytes: [ 0x66, 0xF2, 0x0F, 0x58, 0xC1 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_MODE_64 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "addsd xmm0, xmm1"
|
||||
-
|
||||
input:
|
||||
name: "x86 (64-bit): last mandatory F2/F3 prefix should take priority"
|
||||
bytes: [ 0xF2, 0x66, 0xF3, 0x0F, 0x58, 0xC1 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_MODE_64 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "addss xmm0, xmm1"
|
||||
-
|
||||
input:
|
||||
name: "x86 (64-bit): last mandatory F2/F3 prefix should take priority"
|
||||
bytes: [ 0xF2, 0x3e, 0x66, 0xF3, 0x2e, 0x66, 0x66, 0x0F, 0x58, 0xC1 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_MODE_64 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "addss xmm0, xmm1"
|
||||
-
|
||||
input:
|
||||
name: "x86 (64-bit): do not ignore mandatory 66 prefix when no mandatory F2/F3 prefix is present"
|
||||
bytes: [ 0x66, 0x3e, 0x0F, 0x58, 0xC1 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_MODE_64 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "addpd xmm0, xmm1"
|
||||
-
|
||||
input:
|
||||
name: "x86 (16-bit): SHLD should not ignore data size override prefix, because it is not a mandatory prefix"
|
||||
bytes: [ 0xf3, 0x3e, 0x66, 0x0f, 0xa4, 0x84, 0x17, 0x00, 0x00, 0x00 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_MODE_16 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "shld dword ptr ds:[si + 23], eax, 0"
|
||||
-
|
||||
input:
|
||||
name: "x86 (32-bit): SHLD should not ignore data size override prefix, because it is not a mandatory prefix"
|
||||
bytes: [ 0xf3, 0x3e, 0x66, 0x67, 0x0f, 0xa4, 0x84, 0x17, 0x00, 0x00, 0x00 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_MODE_32 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "shld word ptr ds:[si + 0x17], ax, 0"
|
||||
-
|
||||
input:
|
||||
name: "x86 (64-bit): SHLD should not ignore data size override prefix, because it is not a mandatory prefix"
|
||||
bytes: [ 0xf3, 0x3e, 0x66, 0x67, 0x0f, 0xa4, 0x84, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_MODE_64 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "shld word ptr [edi + edx], ax, 0"
|
||||
-
|
||||
input:
|
||||
name: "x86: POPCNT requires mandatory prefix, but also should allow data size override"
|
||||
bytes: [ 0xf3, 0x0f, 0xb8, 0xc3 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_MODE_64 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "popcnt eax, ebx"
|
||||
-
|
||||
input:
|
||||
name: "x86: POPCNT requires mandatory prefix, but also should allow data size override"
|
||||
bytes: [ 0x66, 0xf3, 0x0f, 0xb8, 0xc3 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_MODE_64 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "popcnt ax, bx"
|
||||
-
|
||||
input:
|
||||
name: "x86: POPCNT requires mandatory prefix, but also should allow data size override"
|
||||
bytes: [ 0xf3, 0x66, 0x0f, 0xb8, 0xc3 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_MODE_64 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "popcnt ax, bx"
|
||||
-
|
||||
input:
|
||||
name: "x86: POPCNT without mandatory prefix should not decode successfully"
|
||||
bytes: [ 0x0f, 0xb8, 0xc3 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_MODE_64 ]
|
||||
expected:
|
||||
insns: []
|
||||
-
|
||||
input:
|
||||
name: "x86: POPCNT with incorrect mandatory prefix should not decode successfully"
|
||||
bytes: [ 0xf2, 0x0f, 0xb8, 0xc3 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_MODE_64 ]
|
||||
expected:
|
||||
insns: []
|
||||
-
|
||||
input:
|
||||
name: "x86: POPCNT without mandatory prefix but with data size override should not decode successfully"
|
||||
bytes: [ 0x66, 0x0f, 0xb8, 0xc3 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_MODE_64 ]
|
||||
expected:
|
||||
insns: []
|
||||
-
|
||||
input:
|
||||
name: "x86: XADD without data size override should decode correctly"
|
||||
bytes: [ 0x0f, 0xc1, 0xd8 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_MODE_64 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "xadd eax, ebx"
|
||||
-
|
||||
input:
|
||||
name: "x86: XADD with data size override should decode correctly"
|
||||
bytes: [ 0x66, 0x0f, 0xc1, 0xd8 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_MODE_64 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "xadd ax, bx"
|
||||
-
|
||||
input:
|
||||
name: "x86: XADD with redundant REP prefix should decode correctly"
|
||||
bytes: [ 0xF2, 0x0f, 0xc1, 0xd8 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_MODE_64 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "xadd eax, ebx"
|
||||
-
|
||||
input:
|
||||
name: "x86: XADD with redundant REP prefix should decode correctly"
|
||||
bytes: [ 0xF3, 0x0f, 0xc1, 0xd8 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_MODE_64 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "xadd eax, ebx"
|
||||
-
|
||||
input:
|
||||
name: "x86: XADD with redundant REP prefix and data size override should decode correctly"
|
||||
bytes: [ 0x66, 0xF3, 0x0f, 0xc1, 0xd8 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_MODE_64 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "xadd ax, bx"
|
||||
-
|
||||
input:
|
||||
name: "x86: XADD with redundant REP prefix and data size override should decode correctly"
|
||||
bytes: [ 0xF2, 0x66, 0x0f, 0xc1, 0xd8 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_MODE_64 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "xadd ax, bx"
|
||||
# We test CMPEQPS because it shares the same 0xB_ opcodes with XADD. XADD ignores the REP prefix, while it is relevant for CMPEQPS.
|
||||
-
|
||||
input:
|
||||
name: "x86: CMPEQPS should decode correctly"
|
||||
bytes: [ 0x0f, 0xc2, 0xc1, 0x00 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_MODE_64 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "cmpeqps xmm0, xmm1"
|
||||
-
|
||||
input:
|
||||
name: "x86: CMPEQSS should decode correctly"
|
||||
bytes: [ 0xf3, 0x0f, 0xc2, 0xc1, 0x00 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_MODE_64 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "cmpeqss xmm0, xmm1"
|
||||
-
|
||||
input:
|
||||
name: "x86: CMPEQPD should decode correctly"
|
||||
bytes: [ 0x66, 0x0f, 0xc2, 0xc1, 0x00 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_MODE_64 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "cmpeqpd xmm0, xmm1"
|
||||
-
|
||||
input:
|
||||
name: "x86: CMPEQPS should decode correctly"
|
||||
bytes: [ 0xf2, 0x0f, 0xc2, 0xc1, 0x00 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_MODE_64 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "cmpeqsd xmm0, xmm1"
|
||||
-
|
||||
input:
|
||||
name: "x86: CMPXCHG should decode correctly with data size override"
|
||||
bytes: [ 0x66, 0x0f, 0xb1, 0xd8 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_MODE_64 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "cmpxchg ax, bx"
|
||||
-
|
||||
input:
|
||||
name: "x86: CMPXCHG should decode correctly with data size override and redundant REP prefixes"
|
||||
bytes: [ 0xf2, 0x67, 0xf3, 0x3e, 0x66, 0x0f, 0xb1, 0xd8 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_MODE_64 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "cmpxchg ax, bx"
|
||||
-
|
||||
input:
|
||||
name: "x86: ADOX with data size override should decode correctly"
|
||||
bytes: [ 0x66, 0xF3, 0x0F, 0x38, 0xF6, 0x24, 0x27 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_MODE_64 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "adox esp, dword ptr [rdi + riz]"
|
||||
-
|
||||
input:
|
||||
name: "x86: CRC32 with data size override should decode correctly"
|
||||
bytes: [ 0x66, 0xF2, 0x0F, 0x38, 0xF1, 0x24, 0x27 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_MODE_64 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "crc32 esp, word ptr [rdi + riz]"
|
||||
-
|
||||
input:
|
||||
name: "x86: CRC32 with data size override should decode correctly"
|
||||
bytes: [ 0xF2, 0x0F, 0x38, 0xF1, 0x24, 0x27 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_MODE_64 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "crc32 esp, dword ptr [rdi + riz]"
|
||||
-
|
||||
input:
|
||||
name: "x86: MOVBE should decode correctly (is encoded as CRC32 without F2)"
|
||||
bytes: [ 0x0F, 0x38, 0xF1, 0x24, 0x27 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_MODE_64 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "movbe dword ptr [rdi + riz], esp"
|
||||
-
|
||||
input:
|
||||
name: "x86: PHADDSW should decode correctly without 66 prefix"
|
||||
bytes: [ 0x0F, 0x38, 0x03, 0xC1 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_MODE_64 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "phaddsw mm0, mm1"
|
||||
-
|
||||
input:
|
||||
name: "x86: PHADDSW should decode correctly with 66 prefix"
|
||||
bytes: [ 0x66, 0x0F, 0x38, 0x03, 0xC1 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_MODE_64 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "phaddsw xmm0, xmm1"
|
||||
-
|
||||
input:
|
||||
name: "x86: PHADDSW should fail to decode with F2 prefix"
|
||||
bytes: [ 0xF2, 0x0F, 0x38, 0x03, 0xC1 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_MODE_64 ]
|
||||
expected:
|
||||
insns: []
|
||||
-
|
||||
input:
|
||||
name: "x86: PHADDSW should fail to decode with F3 prefix"
|
||||
bytes: [ 0xF3, 0x0F, 0x38, 0x03, 0xC1 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_MODE_64 ]
|
||||
expected:
|
||||
insns: []
|
||||
-
|
||||
input:
|
||||
name: "x86: PHADDSW should fail to decode with F2 and 66 prefix"
|
||||
bytes: [ 0xF2, 0x66, 0x0F, 0x38, 0x03, 0xC1 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_MODE_64 ]
|
||||
expected:
|
||||
insns: []
|
||||
-
|
||||
input:
|
||||
name: "x86: PHADDSW should fail to decode with F3 and 66 prefix"
|
||||
bytes: [ 0xF3, 0x66, 0x0F, 0x38, 0x03, 0xC1 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_MODE_64 ]
|
||||
expected:
|
||||
insns: []
|
||||
-
|
||||
input:
|
||||
name: "x86: SYSCALL should decode correctly without prefixes"
|
||||
bytes: [ 0x0F, 0x05 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_MODE_64 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "syscall"
|
||||
-
|
||||
input:
|
||||
name: "x86: SYSCALL should decode correctly with 66 prefix"
|
||||
bytes: [ 0x66, 0x0F, 0x05 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_MODE_64 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "syscall"
|
||||
-
|
||||
input:
|
||||
name: "x86: SYSCALL should decode correctly with F2 prefix"
|
||||
bytes: [ 0xF2, 0x0F, 0x05 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_MODE_64 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "syscall"
|
||||
-
|
||||
input:
|
||||
name: "x86: SYSCALL should decode correctly with F3 prefix"
|
||||
bytes: [ 0xF3, 0x0F, 0x05 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_MODE_64 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "syscall"
|
||||
-
|
||||
input:
|
||||
name: "x86: SYSCALL should decode correctly with many ignored prefixes"
|
||||
bytes: [ 0x67, 0xF2, 0x3E, 0x66, 0xF3, 0x66, 0x64, 0xF2, 0xF2, 0x66, 0x0F, 0x05 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_MODE_64 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "syscall"
|
||||
-
|
||||
input:
|
||||
name: "x86: MOV reg, creg should decode correctly without prefixes"
|
||||
bytes: [ 0x0F, 0x20, 0x00 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_MODE_64 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "mov rax, cr0"
|
||||
-
|
||||
input:
|
||||
name: "x86: MOV reg, creg should ignore data size override prefix"
|
||||
bytes: [ 0x66, 0x0F, 0x20, 0x00 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_MODE_64 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "mov rax, cr0"
|
||||
-
|
||||
input:
|
||||
name: "x86: MOV reg, creg should decode correctly with F2 prefix"
|
||||
bytes: [ 0xF2, 0x0F, 0x20, 0x00 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_MODE_64 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "mov rax, cr0"
|
||||
-
|
||||
input:
|
||||
name: "x86: MOV reg, creg should decode correctly with F3 prefix"
|
||||
bytes: [ 0xF3, 0x0F, 0x20, 0x00 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_MODE_64 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "mov rax, cr0"
|
||||
-
|
||||
input:
|
||||
name: "x86: MOV reg, creg should decode correctly with many ignored prefixes"
|
||||
bytes: [ 0x67, 0xF2, 0x3E, 0x66, 0xF3, 0x66, 0x64, 0xF2, 0xF2, 0x66, 0x0F, 0x20, 0x00 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_MODE_64 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "mov rax, cr0"
|
||||
-
|
||||
input:
|
||||
name: "x86: CMOVo should respect data size override"
|
||||
bytes: [ 0x66, 0x0f, 0x40, 0x00 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_MODE_64 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "cmovo ax, word ptr [rax]"
|
||||
-
|
||||
input:
|
||||
name: "x86: PACKUSWB should be invalid with F2 prefix"
|
||||
bytes: [ 0xF2, 0x0f, 0x67, 0xc1 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_MODE_32 ]
|
||||
expected:
|
||||
insns: []
|
||||
-
|
||||
input:
|
||||
name: "x86: PACKUSWB should be invalid with F2, 66 prefix"
|
||||
bytes: [ 0xF2, 0x66, 0x0f, 0x67, 0xc1 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_MODE_32 ]
|
||||
expected:
|
||||
insns: []
|
||||
-
|
||||
input:
|
||||
name: "x86: PACKUSWB should be invalid with F3 prefix"
|
||||
bytes: [ 0xF3, 0x0f, 0x67, 0xc1 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_MODE_32 ]
|
||||
expected:
|
||||
insns: []
|
||||
-
|
||||
input:
|
||||
name: "x86: PACKUSWB should be invalid with F3, 66 prefix"
|
||||
bytes: [ 0xF3, 0x66, 0x0f, 0x67, 0xc1 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_MODE_32 ]
|
||||
expected:
|
||||
insns: []
|
||||
-
|
||||
input:
|
||||
name: "x86: NOP should respect data size override prefix"
|
||||
bytes: [ 0xF3, 0xF2, 0x66, 0xF3, 0x0f, 0x19, 0x00 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_MODE_64 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "nop word ptr [rax]"
|
||||
-
|
||||
input:
|
||||
name: "x86: NOP should respect data size override prefix"
|
||||
bytes: [ 0xF3, 0xF2, 0xF3, 0x0f, 0x19, 0x00 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_MODE_64 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "nop dword ptr [rax]"
|
||||
-
|
||||
input:
|
||||
name: "x86: PSLLW with F2 prefix should be invalid"
|
||||
bytes: [ 0xF2, 0x66, 0x0F, 0xF1, 0xC1 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_MODE_64 ]
|
||||
expected:
|
||||
insns: []
|
||||
-
|
||||
input:
|
||||
name: "x86: RDRAND should decode correctly"
|
||||
bytes: [ 0x0F, 0xC7, 0xF0 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_MODE_64 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "rdrand eax"
|
||||
-
|
||||
input:
|
||||
name: "x86: RDRAND should respect data size override"
|
||||
bytes: [ 0x66, 0x0F, 0xC7, 0xF0 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_MODE_64 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "rdrand ax"
|
||||
-
|
||||
input:
|
||||
name: "x86: RDRAND should fail to decode with F2 prefix"
|
||||
bytes: [ 0xF2, 0x0F, 0xC7, 0xF0 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_MODE_64 ]
|
||||
expected:
|
||||
insns: []
|
||||
@@ -0,0 +1,293 @@
|
||||
test_cases:
|
||||
# Test segment override priority
|
||||
-
|
||||
input:
|
||||
name: "x86-16: rightmost segment override should take priority"
|
||||
bytes: [ 0x26, 0x65, 0x64, 0x3E, 0x65, 0x2E, 0x00, 0x00 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_OPT_DETAIL, CS_MODE_16 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "add byte ptr cs:[bx + si], al"
|
||||
details:
|
||||
x86:
|
||||
prefix: [ X86_PREFIX_0, X86_PREFIX_CS, X86_PREFIX_0, X86_PREFIX_0 ]
|
||||
-
|
||||
input:
|
||||
name: "x86-32: rightmost segment override should take priority"
|
||||
bytes: [ 0x26, 0x65, 0x64, 0x3E, 0x65, 0x2E, 0x00, 0x00 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_OPT_DETAIL, CS_MODE_32 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "add byte ptr cs:[eax], al"
|
||||
details:
|
||||
x86:
|
||||
prefix: [ X86_PREFIX_0, X86_PREFIX_CS, X86_PREFIX_0, X86_PREFIX_0 ]
|
||||
-
|
||||
input:
|
||||
name: "x86-64: rightmost segment override should take priority"
|
||||
bytes: [ 0x26, 0x65, 0x64, 0x3E, 0x65, 0x2E, 0x00, 0x00 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_OPT_DETAIL, CS_MODE_64 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "add byte ptr gs:[rax], al"
|
||||
details:
|
||||
x86:
|
||||
prefix: [ X86_PREFIX_0, X86_PREFIX_GS, X86_PREFIX_0, X86_PREFIX_0 ]
|
||||
-
|
||||
input:
|
||||
name: "x86-16: rightmost segment override should take priority"
|
||||
bytes: [ 0x3E, 0x3E, 0x26, 0x36, 0x64, 0x36, 0x00, 0x00 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_OPT_DETAIL, CS_MODE_16 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "add byte ptr ss:[bx + si], al"
|
||||
details:
|
||||
x86:
|
||||
prefix: [ X86_PREFIX_0, X86_PREFIX_SS, X86_PREFIX_0, X86_PREFIX_0 ]
|
||||
-
|
||||
input:
|
||||
name: "x86-32: rightmost segment override should take priority"
|
||||
bytes: [ 0x3E, 0x3E, 0x26, 0x36, 0x64, 0x36, 0x00, 0x00 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_OPT_DETAIL, CS_MODE_32 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "add byte ptr ss:[eax], al"
|
||||
details:
|
||||
x86:
|
||||
prefix: [ X86_PREFIX_0, X86_PREFIX_SS, X86_PREFIX_0, X86_PREFIX_0 ]
|
||||
-
|
||||
input:
|
||||
name: "x86-64: rightmost segment override should take priority"
|
||||
bytes: [ 0x3E, 0x3E, 0x26, 0x36, 0x64, 0x36, 0x00, 0x00 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_OPT_DETAIL, CS_MODE_64 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "add byte ptr fs:[rax], al"
|
||||
details:
|
||||
x86:
|
||||
prefix: [ X86_PREFIX_0, X86_PREFIX_FS, X86_PREFIX_0, X86_PREFIX_0 ]
|
||||
# Test segment override differences between 16/32 and 64-bit mode with ECDS and FS/GS
|
||||
-
|
||||
input:
|
||||
name: "x86-16: ECSD segment overrides should override FS/GS segment overrides"
|
||||
bytes: [ 0x64, 0x3E, 0x00, 0x00 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_OPT_DETAIL, CS_MODE_16 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "add byte ptr ds:[bx + si], al"
|
||||
details:
|
||||
x86:
|
||||
prefix: [ X86_PREFIX_0, X86_PREFIX_DS, X86_PREFIX_0, X86_PREFIX_0 ]
|
||||
-
|
||||
input:
|
||||
name: "x86-32: ECSD segment overrides should override FS/GS segment overrides"
|
||||
bytes: [ 0x64, 0x3E, 0x00, 0x00 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_OPT_DETAIL, CS_MODE_32 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "add byte ptr ds:[eax], al"
|
||||
details:
|
||||
x86:
|
||||
prefix: [ X86_PREFIX_0, X86_PREFIX_DS, X86_PREFIX_0, X86_PREFIX_0 ]
|
||||
-
|
||||
input:
|
||||
name: "x86-64: ECSD segment overrides should be ignored and leave FS override intact"
|
||||
bytes: [ 0x64, 0x3E, 0x00, 0x00 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_OPT_DETAIL, CS_MODE_64 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "add byte ptr fs:[rax], al"
|
||||
details:
|
||||
x86:
|
||||
prefix: [ X86_PREFIX_0, X86_PREFIX_FS, X86_PREFIX_0, X86_PREFIX_0 ]
|
||||
-
|
||||
input:
|
||||
name: "x86-64: ECSD segment overrides should be ignored"
|
||||
bytes: [ 0x3E, 0x00, 0x00 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_OPT_DETAIL, CS_MODE_64 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "add byte ptr [rax], al"
|
||||
details:
|
||||
x86:
|
||||
prefix: [ X86_PREFIX_0, X86_PREFIX_DS, X86_PREFIX_0, X86_PREFIX_0 ]
|
||||
# Test duplicate segment override prefixes
|
||||
-
|
||||
input:
|
||||
name: "x86-16: Duplicate ES override prefixes should decode successfully"
|
||||
bytes: [ 0x26, 0x26, 0x00, 0x00 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_OPT_DETAIL, CS_MODE_16 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "add byte ptr es:[bx + si], al"
|
||||
details:
|
||||
x86:
|
||||
prefix: [ X86_PREFIX_0, X86_PREFIX_ES, X86_PREFIX_0, X86_PREFIX_0 ]
|
||||
-
|
||||
input:
|
||||
name: "x86-32: Duplicate ES override prefixes should decode successfully"
|
||||
bytes: [ 0x26, 0x26, 0x00, 0x00 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_OPT_DETAIL, CS_MODE_32 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "add byte ptr es:[eax], al"
|
||||
details:
|
||||
x86:
|
||||
prefix: [ X86_PREFIX_0, X86_PREFIX_ES, X86_PREFIX_0, X86_PREFIX_0 ]
|
||||
-
|
||||
input:
|
||||
name: "x86-64: Duplicate FS override prefixes should decode successfully"
|
||||
bytes: [ 0x64, 0x64, 0x00, 0x00 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_OPT_DETAIL, CS_MODE_64 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "add byte ptr fs:[rax], al"
|
||||
details:
|
||||
x86:
|
||||
prefix: [ X86_PREFIX_0, X86_PREFIX_FS, X86_PREFIX_0, X86_PREFIX_0 ]
|
||||
# Test invalid REX prefix
|
||||
-
|
||||
input:
|
||||
name: "x86-64: Invalid REX prefix should preserve previous segment override"
|
||||
bytes: [ 0x64, 0x40, 0x2E, 0x00, 0x00 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_OPT_DETAIL, CS_MODE_64 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "add byte ptr fs:[rax], al"
|
||||
details:
|
||||
x86:
|
||||
prefix: [ X86_PREFIX_0, X86_PREFIX_FS, X86_PREFIX_0, X86_PREFIX_0 ]
|
||||
-
|
||||
input:
|
||||
name: "x86-64: Invalid REX prefix should not add ECDS segment override"
|
||||
bytes: [ 0x2E, 0x40, 0x2E, 0x00, 0x00 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_OPT_DETAIL, CS_MODE_64 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "add byte ptr [rax], al"
|
||||
details:
|
||||
x86:
|
||||
prefix: [ X86_PREFIX_0, X86_PREFIX_CS, X86_PREFIX_0, X86_PREFIX_0 ]
|
||||
# Test whether `notrack` is correctly decoded
|
||||
-
|
||||
input:
|
||||
name: "x86-16: notrack should decode correctly"
|
||||
bytes: [ 0x3E, 0xE8, 0x00, 0x00 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_OPT_DETAIL, CS_MODE_16 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "notrack call 4"
|
||||
details:
|
||||
x86:
|
||||
prefix: [ X86_PREFIX_0, X86_PREFIX_DS, X86_PREFIX_0, X86_PREFIX_0 ]
|
||||
-
|
||||
input:
|
||||
name: "x86-32: notrack should decode correctly"
|
||||
bytes: [ 0x3E, 0xE8, 0x00, 0x00, 0x00, 0x00 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_OPT_DETAIL, CS_MODE_32 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "notrack call 6"
|
||||
details:
|
||||
x86:
|
||||
prefix: [ X86_PREFIX_0, X86_PREFIX_DS, X86_PREFIX_0, X86_PREFIX_0 ]
|
||||
-
|
||||
input:
|
||||
name: "x86-64: notrack should decode correctly"
|
||||
bytes: [ 0x3E, 0xE8, 0x00, 0x00, 0x00, 0x00 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_OPT_DETAIL, CS_MODE_64 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "notrack call 6"
|
||||
details:
|
||||
x86:
|
||||
prefix: [ X86_PREFIX_0, X86_PREFIX_DS, X86_PREFIX_0, X86_PREFIX_0 ]
|
||||
|
||||
-
|
||||
input:
|
||||
name: "x86-16: notrack should be applied when 0x3E is last segment override prefix"
|
||||
bytes: [ 0x26, 0x64, 0x3E, 0xE8, 0x00, 0x00 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_OPT_DETAIL, CS_MODE_16 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "notrack call 6"
|
||||
details:
|
||||
x86:
|
||||
prefix: [ X86_PREFIX_0, X86_PREFIX_DS, X86_PREFIX_0, X86_PREFIX_0 ]
|
||||
-
|
||||
input:
|
||||
name: "x86-32: notrack should be applied when 0x3E is last segment override prefix"
|
||||
bytes: [ 0x26, 0x64, 0x3E, 0xE8, 0x00, 0x00, 0x00, 0x00 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_OPT_DETAIL, CS_MODE_32 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "notrack call 8"
|
||||
details:
|
||||
x86:
|
||||
prefix: [ X86_PREFIX_0, X86_PREFIX_DS, X86_PREFIX_0, X86_PREFIX_0 ]
|
||||
-
|
||||
input:
|
||||
name: "x86-64: workaround: notrack should only be applied when 0x3E is last segment override prefix and no FS/GS segment override prefix is active"
|
||||
bytes: [ 0x26, 0x64, 0x3E, 0xE8, 0x00, 0x00, 0x00, 0x00 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_OPT_DETAIL, CS_MODE_64 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "call 8"
|
||||
details:
|
||||
x86:
|
||||
prefix: [ X86_PREFIX_0, X86_PREFIX_FS, X86_PREFIX_0, X86_PREFIX_0 ]
|
||||
-
|
||||
input:
|
||||
name: "x86-64: workaround: notrack should only be applied when 0x3E is last segment override prefix and no FS/GS segment override prefix is active"
|
||||
bytes: [ 0x26, 0x2E, 0x3E, 0xE8, 0x00, 0x00, 0x00, 0x00 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_OPT_DETAIL, CS_MODE_64 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "notrack call 8"
|
||||
details:
|
||||
x86:
|
||||
prefix: [ X86_PREFIX_0, X86_PREFIX_DS, X86_PREFIX_0, X86_PREFIX_0 ]
|
||||
@@ -0,0 +1,123 @@
|
||||
test_cases:
|
||||
# From the Intel SDM Section 6.1: XACQUIRE/XRELEASE.
|
||||
-
|
||||
input:
|
||||
name: "Rightmost prefix byte should determine HLE semantic"
|
||||
bytes: [ 0xF3, 0xF2, 0xC6, 0x00, 0x00 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_OPT_DETAIL, CS_MODE_64 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "mov byte ptr [rax], 0"
|
||||
-
|
||||
input:
|
||||
name: "Rightmost prefix byte should determine HLE semantic"
|
||||
bytes: [ 0xF2, 0xF3, 0xC6, 0x00, 0x00 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_OPT_DETAIL, CS_MODE_64 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "xrelease mov byte ptr [rax], 0"
|
||||
-
|
||||
input:
|
||||
name: "Rightmost prefix byte should determine HLE semantic"
|
||||
bytes: [ 0xF2, 0xF3, 0xF0, 0x00, 0x00 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_OPT_DETAIL, CS_MODE_64 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "xrelease lock add byte ptr [rax], al"
|
||||
|
||||
# Prefixes may be ordered freely.
|
||||
-
|
||||
input:
|
||||
name: "Rightmost prefix byte should determine HLE semantic"
|
||||
bytes: [ 0xF0, 0xF2, 0xF3, 0x00, 0x00 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_OPT_DETAIL, CS_MODE_64 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "xrelease lock add byte ptr [rax], al"
|
||||
-
|
||||
input:
|
||||
name: "Rightmost prefix byte should determine HLE semantic"
|
||||
bytes: [ 0xF2, 0xF0, 0xF3, 0x00, 0x00 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_OPT_DETAIL, CS_MODE_64 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "xrelease lock add byte ptr [rax], al"
|
||||
# Special cases: XCHG
|
||||
-
|
||||
input:
|
||||
name: "special case: xacquire without lock on XCHG"
|
||||
bytes: [ 0xF3, 0xF2, 0xF3, 0xF3, 0xF2, 0x87, 0x18 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_OPT_DETAIL, CS_MODE_64 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "xacquire xchg dword ptr [rax], ebx"
|
||||
-
|
||||
input:
|
||||
name: "special case: xrelease without lock on XCHG"
|
||||
bytes: [ 0xF3, 0x87, 0x18 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_OPT_DETAIL, CS_MODE_64 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "xrelease xchg dword ptr [rax], ebx"
|
||||
# Separate tests with REX prefix because it is parsed separately in the decoder
|
||||
-
|
||||
input:
|
||||
name: "xrelease with REX prefix"
|
||||
bytes: [ 0xF3, 0xF0, 0x48, 0x87, 0x18 ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_OPT_DETAIL, CS_MODE_64 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "xrelease lock xchg qword ptr [rax], rbx"
|
||||
# Ensure REPs for string instructions are decoded correctly
|
||||
-
|
||||
input:
|
||||
name: "x86-64: multiple REPs on SCASB should decode to last rep"
|
||||
bytes: [ 0xF2, 0xF3, 0xAE ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_OPT_DETAIL, CS_MODE_64 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "repe scasb al, byte ptr [rdi]"
|
||||
-
|
||||
input:
|
||||
name: "x86-64: LOCK+REP on string operation is invalid"
|
||||
bytes: [ 0xF0, 0xF2, 0xF3, 0xAE ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_OPT_DETAIL, CS_MODE_64 ]
|
||||
expected:
|
||||
insns: []
|
||||
-
|
||||
input:
|
||||
name: "x86-32: multiple REPs on SCASB should decode to last rep"
|
||||
bytes: [ 0xF2, 0xF3, 0xAE ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_OPT_DETAIL, CS_MODE_32 ]
|
||||
expected:
|
||||
insns:
|
||||
-
|
||||
asm_text: "repe scasb al, byte ptr es:[edi]"
|
||||
-
|
||||
input:
|
||||
name: "x86-32: LOCK+REP on string operation is invalid"
|
||||
bytes: [ 0xF0, 0xF2, 0xF3, 0xAE ]
|
||||
arch: "CS_ARCH_X86"
|
||||
options: [ CS_OPT_DETAIL, CS_MODE_32 ]
|
||||
expected:
|
||||
insns: []
|
||||
Reference in New Issue
Block a user