1 # RUN: llvm-mc --disassemble %s -triple=x86_64 | FileCheck %s
6 0xc5 0x04 0xc2 0xc7 0x1f
9 0xc5 0x05 0xc2 0xc7 0x1f
11 # CHECK: vcmptrue_usss
12 0xc5 0x06 0xc2 0xc7 0x1f
14 # CHECK: vcmptrue_ussd
15 0xc5 0x07 0xc2 0xc7 0x1f
18 0xc5 0x04 0xc2 0xc7 0x08
21 0xc5 0x05 0xc2 0xc7 0x08
24 0xc5 0x06 0xc2 0xc7 0x08
27 0xc5 0x07 0xc2 0xc7 0x08
30 0xc5 0x04 0xc2 0xc7 0x00
33 0xc5 0x05 0xc2 0xc7 0x00
36 0xc5 0x06 0xc2 0xc7 0x00
39 0xc5 0x07 0xc2 0xc7 0x00
41 # CHECK: vcmptrue_usps %ymm7, %ymm15, %ymm0
42 0xc4 0xe1 0x84 0xc2 0xc7 0x1f
44 # CHECK: vcmptrue_uspd %ymm7, %ymm15, %ymm0
45 0xc4 0xe1 0x85 0xc2 0xc7 0x1f
51 0x66 0x0f 0xc2 0xc7 0x00
54 0xf3 0x0f 0xc2 0xc7 0x00
57 0xf2 0x0f 0xc2 0xc7 0x00
63 0x66 0x0f 0xc2 0xc7 0x07
66 0xf3 0x0f 0xc2 0xc7 0x07
69 0xf2 0x0f 0xc2 0xc7 0x07
71 # CHECK: extrq $2, $3, %xmm0
72 0x66 0x0f 0x78 0xc0 0x03 0x02
74 # CHECK: extrq %xmm1, %xmm0
77 # CHECK: insertq $6, $5, %xmm1, %xmm0
78 0xf2 0x0f 0x78 0xc1 0x05 0x06
80 # CHECK: insertq %xmm1, %xmm0
83 # CHECK: movntsd %xmm0, (%rdi)
86 # CHECK: movntss %xmm0, (%rdi)
89 # CHECK: adcxl %eax, %eax
90 0x66 0x0f 0x38 0xf6 0xc0
92 # CHECK: adcxl (%rax), %eax
93 0x66 0x0f 0x38 0xf6 0x00
95 # CHECK: adcxq %rax, %rax
96 0x66 0x48 0x0f 0x38 0xf6 0xc0
98 # CHECK: adcxq (%rax), %rax
99 0x66 0x48 0x0f 0x38 0xf6 0x00
101 # CHECK: adoxl %eax, %eax
102 0xf3 0x0f 0x38 0xf6 0xc0
104 # CHECK: adoxl (%rax), %eax
105 0xf3 0x0f 0x38 0xf6 0x00
107 # CHECK: adoxq %rax, %rax
108 0xf3 0x48 0x0f 0x38 0xf6 0xc0
110 # CHECK: adoxq (%rax), %rax
111 0xf3 0x48 0x0f 0x38 0xf6 0x00
114 0xc7 0xf8 0x35 0x00 0x00 0x00
117 0x66 0xc7 0xf8 0x35 0x00
125 # CHECK: xsave64 (%rax)
128 # CHECK: xrstor64 (%rax)
131 # CHECK: xsaveopt64 (%rax)
140 # CHECK: movabsb -6066930261531658096, %al
141 0xa0 0x90 0x78 0x56 0x34 0x12 0xef 0xcd 0xab
143 # CHECK: movabsb -6066930261531658096, %al
144 0x48 0xa0 0x90 0x78 0x56 0x34 0x12 0xef 0xcd 0xab
146 # CHECK: movabsw -6066930261531658096, %ax
147 0x66 0xa1 0x90 0x78 0x56 0x34 0x12 0xef 0xcd 0xab
149 # CHECK: movabsl -6066930261531658096, %eax
150 0xa1 0x90 0x78 0x56 0x34 0x12 0xef 0xcd 0xab
152 # CHECK: movabsq -6066930261531658096, %rax
153 0x48 0xa1 0x90 0x78 0x56 0x34 0x12 0xef 0xcd 0xab
155 # CHECK: movabsb %al, -6066930261531658096
156 0xa2 0x90 0x78 0x56 0x34 0x12 0xef 0xcd 0xab
158 # CHECK: movabsb %al, -6066930261531658096
159 0x48 0xa2 0x90 0x78 0x56 0x34 0x12 0xef 0xcd 0xab
161 # CHECK: movabsw %ax, -6066930261531658096
162 0x66 0xa3 0x90 0x78 0x56 0x34 0x12 0xef 0xcd 0xab
164 # CHECK: movabsl %eax, -6066930261531658096
165 0xa3 0x90 0x78 0x56 0x34 0x12 0xef 0xcd 0xab
167 # CHECK: movabsq %rax, -6066930261531658096
168 0x48 0xa3 0x90 0x78 0x56 0x34 0x12 0xef 0xcd 0xab
170 # CHECK: sha1rnds4 $1, %xmm1, %xmm2
171 0x0f 0x3a 0xcc 0xd1 0x01
173 # CHECK: sha1rnds4 $1, (%rax), %xmm2
174 0x0f 0x3a 0xcc 0x10 0x01
176 # CHECK: sha1nexte %xmm1, %xmm2
179 # CHECK: sha1nexte (%rax), %xmm2
182 # CHECK: sha1msg1 %xmm1, %xmm2
185 # CHECK: sha1msg1 (%rax), %xmm2
188 # CHECK: sha1msg2 %xmm1, %xmm2
191 # CHECK: sha1msg2 (%rax), %xmm2
194 # CHECK: sha256rnds2 %xmm0, (%rax), %xmm2
197 # CHECK: sha256rnds2 %xmm0, %xmm1, %xmm2
200 # CHECK: sha256msg1 %xmm1, %xmm2
203 # CHECK: sha256msg1 (%rax), %xmm2
206 # CHECK: sha256msg2 %xmm1, %xmm2
209 # CHECK: sha256msg2 (%rax), %xmm2
236 # CHECK: movq %xmm0, %xmm0
239 # CHECK: vmovq %xmm0, %xmm0
242 # CHECK: vmovq %xmm0, %rax
243 0xc4 0xe1 0xf9 0x7e 0xc0
245 # CHECK: movq (%rax), %mm0
248 # CHECK: movq %rax, %mm0
251 # CHECK: movq %mm0, (%rax)
254 # CHECK: movq %mm0, %rax
257 # CHECK: movq (%rax), %xmm0
258 0x66 0x48 0x0f 0x6e 0x00
260 # CHECK: movq %rax, %xmm0
261 0x66 0x48 0x0f 0x6e 0xc0
263 # CHECK: movq %xmm0, (%rax)
264 0x66 0x48 0x0f 0x7e 0x00
266 # CHECK: movq %xmm0, %rax
267 0x66 0x48 0x0f 0x7e 0xc0
269 # CHECK: pextrw $3, %xmm3, %ecx
270 0x66 0x0f 0x3a 0x15 0xd9 0x03
272 # CHECK: pextrw $3, %xmm3, (%rax)
273 0x66 0x0f 0x3a 0x15 0x18 0x03
275 # CHECK: addb $0, 305419896(,%r8)
276 0x43 0x80 0x04 0x05 0x78 0x56 0x34 0x12 0x00
278 # CHECK: addb $0, 305419896(%r13,%r8)
279 0x43 0x80 0x84 0x05 0x78 0x56 0x34 0x12 0x00
281 # CHECK: addb $0, 305419896(,%r8)
282 0x42 0x80 0x04 0x05 0x78 0x56 0x34 0x12 0x00
284 # CHECK: addb $0, 305419896(%rbp,%r8)
285 0x42 0x80 0x84 0x05 0x78 0x56 0x34 0x12 0x00
287 # CHECK: addb $0, 305419896(,%r12)
288 0x42 0x80 0x04 0x25 0x78 0x56 0x34 0x12 0x00
290 # CHECK: addb $0, 305419896(%rbp,%r12)
291 0x42 0x80 0x84 0x25 0x78 0x56 0x34 0x12 0x00
293 # CHECK: addb $0, 305419896
294 0x80 0x04 0x25 0x78 0x56 0x34 0x12 0x00
296 # CHECK: addb $0, 305419896(%rbp)
297 0x80 0x85 0x78 0x56 0x34 0x12 0x00
299 # CHECK: addb $0, 305419896(%rbp,%riz)
300 0x80 0x84 0x25 0x78 0x56 0x34 0x12 0x00
302 # CHECK: addb $0, 305419896(%rbp,%riz,2)
303 0x80 0x84 0x65 0x78 0x56 0x34 0x12 0x00
305 # CHECK: addb $0, 305419896(%rsp,%riz,2)
306 0x80 0x84 0x64 0x78 0x56 0x34 0x12 0x00
308 # CHECK: addb $0, 305419896(%r12,%riz,2)
309 0x41 0x80 0x84 0x64 0x78 0x56 0x34 0x12 0x00
311 # CHECK: addb $0, 305419896(%esp,%eiz,2)
312 0x67 0x80 0x84 0x64 0x78 0x56 0x34 0x12 0x00
314 # CHECK: addb $0, 305419896(%r12d,%eiz,2)
315 0x67 0x41 0x80 0x84 0x64 0x78 0x56 0x34 0x12 0x00
317 # CHECK: movabsq 6510615555426900570, %rax
318 0x48 0xa1 0x5a 0x5a 0x5a 0x5a 0x5a 0x5a 0x5a 0x5a
320 # CHECK: movq 1515870810, %rax
321 0x67, 0x48 0xa1 0x5a 0x5a 0x5a 0x5a
323 # CHECK: movabsq %rax, 6510615555426900570
324 0x48 0xa3 0x5a 0x5a 0x5a 0x5a 0x5a 0x5a 0x5a 0x5a
326 # CHECK: movq %rax, 1515870810
327 0x67, 0x48 0xa3 0x5a 0x5a 0x5a 0x5a
330 0xe8,0xff,0x7f,0x00,0x00
332 # TODO: Should display data16 prefixes.
335 0x66 0x66 0x48 0xe8 0xff 0x7f 0x00 0x00
338 0xe9 0xff 0x7f 0xff 0xff
343 # TODO: Should display data16 prefixes.
346 0x66 0x66 0x48 0xe9 0xff 0x7f 0x00 0x00
349 0x0f 0x80 0xff 0x7f 0xff 0xff
352 0x66 0x0f 0x80 0xff 0x7f
355 0x0f 0x81 0xff 0x7f 0xff 0xff
358 0x66 0x0f 0x81 0xff 0x7f
361 0x0f 0x82 0xff 0x7f 0xff 0xff
364 0x66 0x0f 0x82 0xff 0x7f
367 0x0f 0x83 0xff 0x7f 0xff 0xff
370 0x66 0x0f 0x83 0xff 0x7f
373 0x0f 0x84 0xff 0x7f 0xff 0xff
376 0x66 0x0f 0x84 0xff 0x7f
379 0x0f 0x85 0xff 0x7f 0xff 0xff
382 0x66 0x0f 0x85 0xff 0x7f
385 0x0f 0x86 0xff 0x7f 0xff 0xff
388 0x66 0x0f 0x86 0xff 0x7f
391 0x0f 0x87 0xff 0x7f 0xff 0xff
394 0x66 0x0f 0x87 0xff 0x7f
397 0x0f 0x88 0xff 0x7f 0xff 0xff
400 0x66 0x0f 0x88 0xff 0x7f
403 0x0f 0x89 0xff 0x7f 0xff 0xff
406 0x66 0x0f 0x89 0xff 0x7f
409 0x0f 0x8a 0xff 0x7f 0xff 0xff
412 0x66 0x0f 0x8a 0xff 0x7f
415 0x0f 0x8b 0xff 0x7f 0xff 0xff
418 0x66 0x0f 0x8b 0xff 0x7f
421 0x0f 0x8c 0xff 0x7f 0xff 0xff
424 0x66 0x0f 0x8c 0xff 0x7f
427 0x0f 0x8d 0xff 0x7f 0xff 0xff
430 0x66 0x0f 0x8d 0xff 0x7f
433 0x0f 0x8e 0xff 0x7f 0xff 0xff
436 0x66 0x0f 0x8e 0xff 0x7f
439 0x0f 0x8f 0xff 0x7f 0xff 0xff
442 0x66 0x0f 0x8f 0xff 0x7f
444 # CHECK: lcallw *-32769(%rip)
445 0x66 0xff 0x1d 0xff 0x7f 0xff 0xff
447 # CHECK: ljmpw *-32769(%rip)
448 0x66 0xff 0x2d 0xff 0x7f 0xff 0xff
450 # CHECK: psubsb (%rdx), %mm3
453 # CHECK: psubsb (%rdx), %xmm3
456 # CHECK: addq 255(%rip), %rbx
457 0x49, 0x03, 0x1d, 0xff, 0x00, 0x00, 0x00
459 # The following 4 encodings are equivalent, as confirmed by the 'xed64'
460 # decoder tool provided by Intel, which we assume to be canonical even
461 # if the real silicon does something different. If that should happen,
462 # then we'll all have disassembler bugs to repair.
464 # Try all combinations of EVEX.x and REX.b:
465 # CHECK: vaddps 287453952(%rip), %zmm20, %zmm15
466 0x62 0x11 0x5c 0x40 0x58 0x3d 0x00 0x33 0x22 0x11
467 # CHECK: vaddps 287453952(%rip), %zmm20, %zmm15
468 0x62 0x31 0x5c 0x40 0x58 0x3d 0x00 0x33 0x22 0x11
469 # CHECK: vaddps 287453952(%rip), %zmm20, %zmm15
470 0x62 0x51 0x5c 0x40 0x58 0x3d 0x00 0x33 0x22 0x11
471 # CHECK: vaddps 287453952(%rip), %zmm20, %zmm15
472 0x62 0x71 0x5c 0x40 0x58 0x3d 0x00 0x33 0x22 0x11
474 # CHECK: vaddps (%r10,%r9), %zmm20, %zmm15
475 0x62 0x11 0x5c 0x40 0x58 0x3c 0x0a
477 # CHECK: vaddps (%rdx,%r9), %zmm20, %zmm15
478 0x62 0x31 0x5c 0x40 0x58 0x3c 0x0a
480 # CHECK: vaddps (%r10,%rcx), %zmm20, %zmm15
481 0x62 0x51 0x5c 0x40 0x58 0x3c 0x0a
483 # CHECK: vaddps (%rdx,%rcx), %zmm20, %zmm15
484 0x62 0x71 0x5c 0x40 0x58 0x3c 0x0a
486 # CHECK: vpandd 32(%rsi,%r14,4){1to16}, %zmm26, %zmm21 {%k4} {z}
487 0x62 0xa1 0x2d 0xd4 0xdb 0x6c 0xb6 0x08
490 0xe8 0xff 0x7f 0x00 0x00
492 # CHECK: callq -32769
493 0xe8 0xff 0x7f 0xff 0xff
496 0x8f 0xe9 0xf8 0x12 0xc0
499 0x8f 0xe9 0xf8 0x12 0xc8
501 # CHECK: lwpins $305419896, %ebx, %rax
502 0x8f 0xea 0xf8 0x12 0xc3 0x78 0x56 0x34 0x12
504 # CHECK: lwpins $591751049, (%rsp), %rdx
505 0x8f 0xea 0xe8 0x12 0x04 0x24 0x89 0x67 0x45 0x23
507 # CHECK: lwpins $591751049, (%esp), %edx
508 0x67 0x8f 0xea 0x68 0x12 0x04 0x24 0x89 0x67 0x45 0x23
510 # CHECK: lwpval $1737075661, %ebx, %rax
511 0x8f 0xea 0xf8 0x12 0xcb 0xcd 0xab 0x89 0x67
513 # CHECK: lwpval $2309737967, (%rsp), %rdx
514 0x8f 0xea 0xe8 0x12 0x0c 0x24 0xef 0xcd 0xab 0x89
516 # CHECK: lwpval $2309737967, (%esp), %edx
517 0x67 0x8f 0xea 0x68 0x12 0x0c 0x24 0xef 0xcd 0xab 0x89
519 # CHECK: nopq -559038737(%rbx,%rcx,8)
520 0x48 0x0f 0x1f 0x84 0xcb 0xef 0xbe 0xad 0xde
531 # CHECK: xchgw %di, %ax
534 # CHECK: movq %rdx, %cs
537 # CHECK: movw %bx, %cs:(%rsi,%rbp)
538 0x2e 0x66 0x89 0x1c 0x2e
539 # CHECK: movl %ebx, %cs:(%esi,%ebp)
540 0x2e 0x67 0x89 0x1c 0x2e
541 # CHECK: movl %ebx, %cs:(%rsi,%rbp)
543 # CHECK: movw %bx, %cs:(%esi,%ebp)
544 0x2e 0x67 0x66 0x89 0x1c 0x2e
545 # CHECK: movw %bx, %cs:(%esi,%ebp)
546 0x2e 0x66 0x67 0x89 0x1c 0x2e
548 # CHECK: ptwritel -559038737(%rbx,%rcx,8)
549 0xf3 0x0f 0xae 0xa4 0xcb 0xef 0xbe 0xad 0xde
551 # CHECK: ptwritel %eax
554 # CHECK: ptwriteq -559038737(%rbx,%rcx,8)
555 0xf3 0x48 0x0f 0xae 0xa4 0xcb 0xef 0xbe 0xad 0xde
557 # CHECK: ptwriteq %rax
558 0xf3 0x48 0x0f 0xae 0xe0
566 # CHECK: cldemote 4(%rax)
569 # CHECK: cldemote -559038737(%rbx,%rcx,8)
570 0x0f,0x1c,0x84,0xcb,0xef,0xbe,0xad,0xde
572 # CHECK: umonitor %rax
575 # CHECK: umonitor %eax
576 0x67 0xf3 0x0f 0xae 0xf0
578 # CHECK: umonitor %r13
579 0xf3 0x41 0x0f 0xae 0xf5
582 0xf2 0x41 0x0f 0xae 0xf7
585 0x66 0x41 0x0f 0xae 0xf7
596 #CHECK: movdiri %r13d, 64(%rdx,%rax,4)
597 0x44 0x0f 0x38 0xf9 0x6c 0x82 0x40
599 #CHECK: movdir64b 485498096, %rax
600 0x66 0x0f 0x38 0xf8 0x04 0x25 0xf0 0x1c 0xf0 0x1c
602 #CHECK: movdir64b 485498096, %eax
603 0x67 0x66 0x0f 0x38 0xf8 0x04 0x25 0xf0 0x1c 0xf0 0x1c
617 # Make sure we ignore EVEX.X when the index register isn't being used.
618 #CHECK: vaddps (%rax), %xmm16, %xmm1
619 0x62 0xb1 0x7c 0x00 0x58 0x08
621 # Make sure we ignore EVEX.X when modrm.rm encodes a GPR.
622 #CHECK: vcvtusi2sd %rax, %xmm1, %xmm1
623 0x62 0xb1 0xf7 0x08 0x7b 0xc8
625 # Make sure we ignore EVEX.X when modrm.rm encodes a k-register.
626 #CHECK: vpmovm2b %k0, %xmm0
627 0x62,0xb2,0x7e,0x08,0x28,0xc0
629 # 0x67 prefix prints %eip instead of %rip
630 #CHECK: addb %al, (%eip)
631 0x67,0x00,0x05,0x00,0x00,0x00,0x00
633 # CHECK: movslq %eax, %eax
635 # CHECK: movslq %eax, %ax
637 # CHECK: movslq (%rax), %ecx
639 # CHECK: movslq (%rax), %cx
642 # CHECK: enqcmd 485498096, %eax
643 0x67,0xf2,0x0f,0x38,0xf8,0x04,0x25,0xf0,0x1c,0xf0,0x1c
645 # CHECK: enqcmd 268435456(%ebp,%r14d,8), %esi
646 0x67,0xf2,0x42,0x0f,0x38,0xf8,0xb4,0xf5,0x00,0x00,0x00,0x10
648 # CHECK: enqcmd (%r9d), %edi
649 0x67,0xf2,0x41,0x0f,0x38,0xf8,0x39
651 # CHECK: enqcmd 8128(%ecx), %eax
652 0x67,0xf2,0x0f,0x38,0xf8,0x81,0xc0,0x1f,0x00,0x00
654 # CHECK: enqcmd -8192(%edx), %ebx
655 0x67,0xf2,0x0f,0x38,0xf8,0x9a,0x00,0xe0,0xff,0xff
657 # CHECK: enqcmds 268435456(%ebp,%r14d,8), %esi
658 0x67,0xf3,0x42,0x0f,0x38,0xf8,0xb4,0xf5,0x00,0x00,0x00,0x10
660 # CHECK: enqcmds (%r9d), %edi
661 0x67,0xf3,0x41,0x0f,0x38,0xf8,0x39
663 # CHECK: enqcmds 8128(%ecx), %eax
664 0x67,0xf3,0x0f,0x38,0xf8,0x81,0xc0,0x1f,0x00,0x00
666 # CHECK: enqcmds -8192(%edx), %ebx
667 0x67,0xf3,0x0f,0x38,0xf8,0x9a,0x00,0xe0,0xff,0xff
669 # CHECK: enqcmds 485498096, %eax
670 0x67,0xf3,0x0f,0x38,0xf8,0x04,0x25,0xf0,0x1c,0xf0,0x1c
672 # CHECK: enqcmd 268435456(%rbp,%r14,8), %rsi
673 0xf2,0x42,0x0f,0x38,0xf8,0xb4,0xf5,0x00,0x00,0x00,0x10
675 # CHECK: enqcmd (%r9), %rdi
676 0xf2,0x41,0x0f,0x38,0xf8,0x39
678 # CHECK: enqcmd 8128(%rcx), %rax
679 0xf2,0x0f,0x38,0xf8,0x81,0xc0,0x1f,0x00,0x00
681 # CHECK: enqcmd -8192(%rdx), %rbx
682 0xf2,0x0f,0x38,0xf8,0x9a,0x00,0xe0,0xff,0xff
684 # CHECK: enqcmd 485498096, %rax
685 0xf2,0x0f,0x38,0xf8,0x04,0x25,0xf0,0x1c,0xf0,0x1c
687 # CHECK: enqcmds 268435456(%rbp,%r14,8), %rsi
688 0xf3,0x42,0x0f,0x38,0xf8,0xb4,0xf5,0x00,0x00,0x00,0x10
690 # CHECK: enqcmds (%r9), %rdi
691 0xf3,0x41,0x0f,0x38,0xf8,0x39
693 # CHECK: enqcmds 8128(%rcx), %rax
694 0xf3,0x0f,0x38,0xf8,0x81,0xc0,0x1f,0x00,0x00
696 # CHECK: enqcmds -8192(%rdx), %rbx
697 0xf3,0x0f,0x38,0xf8,0x9a,0x00,0xe0,0xff,0xff
699 # CHECK: enqcmds 485498096, %rax
700 0xf3,0x0f,0x38,0xf8,0x04,0x25,0xf0,0x1c,0xf0,0x1c
724 0xf3 0x0f 0x3a 0xf0 0xc0 0x01
753 # CHECK: senduipi %rax
756 # CHECK: senduipi %rdx
759 # CHECK: senduipi %r8
760 0xf3,0x41,0x0f,0xc7,0xf0
762 # CHECK: senduipi %r13
763 0xf3,0x41,0x0f,0xc7,0xf5
768 # CHECK: prefetchit0 (%rip)
769 0x0f,0x18,0x3d,0x00,0x00,0x00,0x00
771 # CHECK: prefetchit1 (%rip)
772 0x0f,0x18,0x35,0x00,0x00,0x00,0x00