1 // RUN: llvm-mc -triple x86_64-unknown-unknown %s > %t 2> %t.err
2 // RUN: FileCheck < %t %s
3 // RUN: FileCheck --check-prefix=CHECK-STDERR < %t.err %s
5 // CHECK: subb %al, %al
8 // CHECK: addl $24, %eax
11 // CHECK: movl %eax, 10(%ebp)
13 // CHECK: movl %eax, 10(%ebp,%ebx)
14 movl %eax, 10(%ebp, %ebx)
15 // CHECK: movl %eax, 10(%ebp,%ebx,4)
16 movl %eax, 10(%ebp, %ebx, 4)
17 // CHECK: movl %eax, 10(,%ebx,4)
18 movl %eax, 10(, %ebx, 4)
20 // CHECK: movl 0, %eax
22 // CHECK: movl $0, %eax
28 // FIXME: Check that this matches SUB32ri8
29 // CHECK: subl $1, %eax
32 // FIXME: Check that this matches SUB32ri8
33 // CHECK: subl $-1, %eax
36 // FIXME: Check that this matches SUB32ri
37 // CHECK: subl $256, %eax
40 // FIXME: Check that this matches XOR64ri8
41 // CHECK: xorq $1, %rax
44 // FIXME: Check that this matches XOR64ri32
45 // CHECK: xorq $256, %rax
48 // FIXME: Check that this matches SUB8rr
49 // CHECK: subb %al, %bl
52 // FIXME: Check that this matches SUB16rr
53 // CHECK: subw %ax, %bx
56 // FIXME: Check that this matches SUB32rr
57 // CHECK: subl %eax, %ebx
60 // FIXME: Check that this matches the correct instruction.
64 // FIXME: Check that this matches the correct instruction.
65 // CHECK: shldl %cl, %eax, %ebx
68 // CHECK: shll $2, %eax
71 // CHECK: shll $2, %eax
94 // NOTE: repz and repe have the same opcode as rep
99 // NOTE: repnz has the same opcode as repne
104 // NOTE: repe and repz have the same opcode as rep
114 // CHECK: cmpxchgb %al, (%ebx)
115 lock;cmpxchgb %al, 0(%ebx)
118 // CHECK: movb (%eax), %al
122 // CHECK: movb (%eax), %al
126 // CHECK: movb (%eax), %al
130 // CHECK: movb (%eax), %al
134 // CHECK: movb (%eax), %al
138 // CHECK: movb (%eax), %al
141 // CHECK: fadd %st(0)
142 // CHECK: fadd %st(1)
143 // CHECK: fadd %st(7)
149 // CHECK: leal 0, %eax
152 // rdar://7986634 - Insensitivity on opcodes.
157 // Allow scale factor without index register.
158 // CHECK: movaps %xmm3, (%esi)
159 // CHECK-STDERR: warning: scale factor without index register is ignored
160 movaps %xmm3, (%esi, 2)
162 // CHECK: imull $12, %eax, %eax
165 // CHECK: imull %ecx, %eax
170 // CHECK: outb %al, $161
172 // CHECK: outw %ax, $128
174 // CHECK: inb $161, %al
186 // CHECK: cmovnew %bx, %ax
188 // CHECK: cmovneq %rbx, %rax
193 // CHECK: inb $127, %al
194 // CHECK: inw %dx, %ax
195 // CHECK: outb %al, $127
196 // CHECK: outw %ax, %dx
197 // CHECK: inl %dx, %eax