1 // RUN: not llvm-mc -triple x86_64-unknown-unknown --show-encoding %s 2> %t.err | FileCheck --check-prefix=64 %s
2 // RUN: FileCheck --check-prefix=ERR64 < %t.err %s
3 // RUN: not llvm-mc -triple i386-unknown-unknown --show-encoding %s 2> %t.err | FileCheck --check-prefix=32 %s
4 // RUN: FileCheck --check-prefix=ERR32 < %t.err %s
5 // RUN: not llvm-mc -triple i386-unknown-unknown-code16 --show-encoding %s 2> %t.err | FileCheck --check-prefix=16 %s
6 // RUN: FileCheck --check-prefix=ERR16 < %t.err %s
9 // 64: lodsb (%rsi), %al # encoding: [0xac]
10 // 32: lodsb (%esi), %al # encoding: [0xac]
11 // 16: lodsb (%si), %al # encoding: [0xac]
14 // 64: lodsb (%rsi), %al # encoding: [0xac]
19 // 64: lodsb (%esi), %al # encoding: [0x67,0xac]
20 // 32: lodsb (%esi), %al # encoding: [0xac]
21 // 16: lodsb (%esi), %al # encoding: [0x67,0xac]
24 // ERR64: invalid 16-bit base register
25 // 32: lodsb (%si), %al # encoding: [0x67,0xac]
26 // 16: lodsb (%si), %al # encoding: [0xac]
29 // 64: lodsl %gs:(%esi), %eax # encoding: [0x65,0x67,0xad]
30 // 32: lodsl %gs:(%esi), %eax # encoding: [0x65,0xad]
31 // 16: lodsl %gs:(%esi), %eax # encoding: [0x66,0x65,0x67,0xad]
34 // ERR64: invalid operand
35 // ERR32: invalid operand
36 // ERR16: invalid operand
39 // ERR64: invalid operand
40 // ERR32: invalid operand
41 // ERR16: invalid operand
44 // 64: lodsw (%esi), %ax # encoding: [0x66,0x67,0xad]
45 // 32: lodsw (%esi), %ax # encoding: [0x66,0xad]
46 // 16: lodsw (%esi), %ax # encoding: [0x67,0xad]
49 // 64: stosw %ax, %es:(%rdi) # encoding: [0x66,0xab]
50 // 32: stosw %ax, %es:(%edi) # encoding: [0x66,0xab]
51 // 16: stosw %ax, %es:(%di) # encoding: [0xab]
54 // 64: stosl %eax, %es:(%edi) # encoding: [0x67,0xab]
55 // 32: stosl %eax, %es:(%edi) # encoding: [0xab]
56 // 16: stosl %eax, %es:(%edi) # encoding: [0x66,0x67,0xab]
59 // ERR64: invalid operand for instruction
60 // ERR32: invalid operand for instruction
61 // ERR16: invalid operand for instruction
64 // 64: stosb %al, %es:(%edi) # encoding: [0x67,0xaa]
65 // 32: stosb %al, %es:(%edi) # encoding: [0xaa]
66 // 16: stosb %al, %es:(%edi) # encoding: [0x67,0xaa]
69 // 64: stosq %rax, %es:(%rdi) # encoding: [0x48,0xab]
74 // 64: stosq %rax, %es:(%edi) # encoding: [0x48,0x67,0xab]
75 // ERR32: only available in 64-bit mode
76 // ERR16: only available in 64-bit mode