1 // RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding %s | FileCheck %s
5 // CHECK: encoding: [0x66,0xe8,A,A]
9 // CHECK: movq %gs:(%rdi), %rax
10 // CHECK: encoding: [0x65,0x48,0x8b,0x07]
13 // CHECK: crc32b %bl, %eax
14 // CHECK: encoding: [0xf2,0x0f,0x38,0xf0,0xc3]
17 // CHECK: crc32b 4(%rbx), %eax
18 // CHECK: encoding: [0xf2,0x0f,0x38,0xf0,0x43,0x04]
21 // CHECK: crc32w %bx, %eax
22 // CHECK: encoding: [0x66,0xf2,0x0f,0x38,0xf1,0xc3]
25 // CHECK: crc32w 4(%rbx), %eax
26 // CHECK: encoding: [0x66,0xf2,0x0f,0x38,0xf1,0x43,0x04]
29 // CHECK: crc32l %ebx, %eax
30 // CHECK: encoding: [0xf2,0x0f,0x38,0xf1,0xc3]
33 // CHECK: crc32l 4(%rbx), %eax
34 // CHECK: encoding: [0xf2,0x0f,0x38,0xf1,0x43,0x04]
37 // CHECK: crc32l 3735928559(%rbx,%rcx,8), %ecx
38 // CHECK: encoding: [0xf2,0x0f,0x38,0xf1,0x8c,0xcb,0xef,0xbe,0xad,0xde]
39 crc32l 0xdeadbeef(%rbx,%rcx,8),%ecx
41 // CHECK: crc32l 69, %ecx
42 // CHECK: encoding: [0xf2,0x0f,0x38,0xf1,0x0c,0x25,0x45,0x00,0x00,0x00]
45 // CHECK: crc32l 32493, %ecx
46 // CHECK: encoding: [0xf2,0x0f,0x38,0xf1,0x0c,0x25,0xed,0x7e,0x00,0x00]
49 // CHECK: crc32l 3133065982, %ecx
50 // CHECK: encoding: [0xf2,0x0f,0x38,0xf1,0x0c,0x25,0xfe,0xca,0xbe,0xba]
51 crc32l 0xbabecafe,%ecx
53 // CHECK: crc32l %ecx, %ecx
54 // CHECK: encoding: [0xf2,0x0f,0x38,0xf1,0xc9]
57 // CHECK: crc32b %r11b, %eax
58 // CHECK: encoding: [0xf2,0x41,0x0f,0x38,0xf0,0xc3]
61 // CHECK: crc32b 4(%rbx), %eax
62 // CHECK: encoding: [0xf2,0x0f,0x38,0xf0,0x43,0x04]
65 // CHECK: crc32b %dil, %rax
66 // CHECK: encoding: [0xf2,0x48,0x0f,0x38,0xf0,0xc7]
69 // CHECK: crc32b %r11b, %rax
70 // CHECK: encoding: [0xf2,0x49,0x0f,0x38,0xf0,0xc3]
73 // CHECK: crc32b 4(%rbx), %rax
74 // CHECK: encoding: [0xf2,0x48,0x0f,0x38,0xf0,0x43,0x04]
77 // CHECK: crc32q %rbx, %rax
78 // CHECK: encoding: [0xf2,0x48,0x0f,0x38,0xf1,0xc3]
81 // CHECK: crc32q 4(%rbx), %rax
82 // CHECK: encoding: [0xf2,0x48,0x0f,0x38,0xf1,0x43,0x04]
85 // CHECK: movd %r8, %mm1
86 // CHECK: encoding: [0x49,0x0f,0x6e,0xc8]
89 // CHECK: movd %r8d, %mm1
90 // CHECK: encoding: [0x41,0x0f,0x6e,0xc8]
93 // CHECK: movd %rdx, %mm1
94 // CHECK: encoding: [0x48,0x0f,0x6e,0xca]
97 // CHECK: movd %edx, %mm1
98 // CHECK: encoding: [0x0f,0x6e,0xca]
101 // CHECK: movd %mm1, %r8
102 // CHECK: encoding: [0x49,0x0f,0x7e,0xc8]
105 // CHECK: movd %mm1, %r8d
106 // CHECK: encoding: [0x41,0x0f,0x7e,0xc8]
109 // CHECK: movd %mm1, %rdx
110 // CHECK: encoding: [0x48,0x0f,0x7e,0xca]
113 // CHECK: movd %mm1, %edx
114 // CHECK: encoding: [0x0f,0x7e,0xca]
118 // CHECK: pshufb CPI1_0(%rip), %xmm1
119 // CHECK: encoding: [0x66,0x0f,0x38,0x00,0x0d,A,A,A,A]
120 // CHECK: fixup A - offset: 5, value: CPI1_0-4
121 pshufb CPI1_0(%rip), %xmm1
123 // CHECK: sha1rnds4 $1, %xmm1, %xmm2
124 // CHECK: encoding: [0x0f,0x3a,0xcc,0xd1,0x01]
125 sha1rnds4 $1, %xmm1, %xmm2
127 // CHECK: sha1rnds4 $1, (%rax), %xmm2
128 // CHECK: encoding: [0x0f,0x3a,0xcc,0x10,0x01]
129 sha1rnds4 $1, (%rax), %xmm2
131 // CHECK: sha1nexte %xmm1, %xmm2
132 // CHECK: encoding: [0x0f,0x38,0xc8,0xd1]
133 sha1nexte %xmm1, %xmm2
135 // CHECK: sha1msg1 %xmm1, %xmm2
136 // CHECK: encoding: [0x0f,0x38,0xc9,0xd1]
137 sha1msg1 %xmm1, %xmm2
139 // CHECK: sha1msg1 (%rax), %xmm2
140 // CHECK: encoding: [0x0f,0x38,0xc9,0x10]
141 sha1msg1 (%rax), %xmm2
143 // CHECK: sha1msg2 %xmm1, %xmm2
144 // CHECK: encoding: [0x0f,0x38,0xca,0xd1]
145 sha1msg2 %xmm1, %xmm2
147 // CHECK: sha1msg2 (%rax), %xmm2
148 // CHECK: encoding: [0x0f,0x38,0xca,0x10]
149 sha1msg2 (%rax), %xmm2
151 // CHECK: sha256rnds2 (%rax), %xmm2
152 // CHECK: encoding: [0x0f,0x38,0xcb,0x10]
153 sha256rnds2 (%rax), %xmm2
155 // CHECK: sha256rnds2 %xmm1, %xmm2
156 // CHECK: encoding: [0x0f,0x38,0xcb,0xd1]
157 sha256rnds2 %xmm1, %xmm2
159 // CHECK: sha256rnds2 (%rax), %xmm2
160 // CHECK: encoding: [0x0f,0x38,0xcb,0x10]
161 sha256rnds2 %xmm0, (%rax), %xmm2
163 // CHECK: sha256rnds2 %xmm1, %xmm2
164 // CHECK: encoding: [0x0f,0x38,0xcb,0xd1]
165 sha256rnds2 %xmm0, %xmm1, %xmm2
167 // CHECK: sha256msg1 %xmm1, %xmm2
168 // CHECK: encoding: [0x0f,0x38,0xcc,0xd1]
169 sha256msg1 %xmm1, %xmm2
171 // CHECK: sha256msg1 (%rax), %xmm2
172 // CHECK: encoding: [0x0f,0x38,0xcc,0x10]
173 sha256msg1 (%rax), %xmm2
175 // CHECK: sha256msg2 %xmm1, %xmm2
176 // CHECK: encoding: [0x0f,0x38,0xcd,0xd1]
177 sha256msg2 %xmm1, %xmm2
179 // CHECK: sha256msg2 (%rax), %xmm2
180 // CHECK: encoding: [0x0f,0x38,0xcd,0x10]
181 sha256msg2 (%rax), %xmm2
183 // CHECK: movq 57005(,%riz), %rbx
184 // CHECK: encoding: [0x48,0x8b,0x1c,0x25,0xad,0xde,0x00,0x00]
185 movq 57005(,%riz), %rbx
187 // CHECK: movq 48879(,%riz), %rax
188 // CHECK: encoding: [0x48,0x8b,0x04,0x25,0xef,0xbe,0x00,0x00]
189 movq 48879(,%riz), %rax
191 // CHECK: movq -4(,%riz,8), %rax
192 // CHECK: encoding: [0x48,0x8b,0x04,0xe5,0xfc,0xff,0xff,0xff]
193 movq -4(,%riz,8), %rax
195 // CHECK: movq (%rcx,%riz), %rax
196 // CHECK: encoding: [0x48,0x8b,0x04,0x21]
197 movq (%rcx,%riz), %rax
199 // CHECK: movq (%rcx,%riz,8), %rax
200 // CHECK: encoding: [0x48,0x8b,0x04,0xe1]
201 movq (%rcx,%riz,8), %rax
203 // CHECK: fxsave64 (%rax)
204 // CHECK: encoding: [0x48,0x0f,0xae,0x00]
207 // CHECK: fxsave64 (%rax)
208 // CHECK: encoding: [0x48,0x0f,0xae,0x00]
211 // CHECK: fxrstor64 (%rax)
212 // CHECK: encoding: [0x48,0x0f,0xae,0x08]
215 // CHECK: fxrstor64 (%rax)
216 // CHECK: encoding: [0x48,0x0f,0xae,0x08]
220 // CHECK: encoding: [0xc9]
224 // CHECK: encoding: [0xc9]
227 // CHECK: flds (%edi)
228 // CHECK: encoding: [0x67,0xd9,0x07]
231 // CHECK: filds (%edi)
232 // CHECK: encoding: [0x67,0xdf,0x07]
235 // CHECK: flds (%rdi)
236 // CHECK: encoding: [0xd9,0x07]
239 // CHECK: filds (%rdi)
240 // CHECK: encoding: [0xdf,0x07]
243 // CHECK: pmovmskb %xmm5, %ecx
244 // CHECK: encoding: [0x66,0x0f,0xd7,0xcd]
247 // CHECK: pinsrw $3, %ecx, %xmm5
248 // CHECK: encoding: [0x66,0x0f,0xc4,0xe9,0x03]
249 pinsrw $3, %ecx, %xmm5
251 // CHECK: pinsrw $3, %ecx, %xmm5
252 // CHECK: encoding: [0x66,0x0f,0xc4,0xe9,0x03]
253 pinsrw $3, %rcx, %xmm5