Home | History | Annotate | Download | only in X86
      1 # RUN: llvm-mc --disassemble %s -triple=x86_64 | FileCheck %s
      2 
      3 # CHECK: lock
      4 # CHECK-NEXT:	orl	$16, %fs:776
      5 0xf0 0x64 0x83 0x0c 0x25 0x08 0x03 0x00 0x00 0x10
      6 
      7 # CHECK: movq	%fs:768, %rdi
      8 0x64 0x48 0x8b 0x3c 0x25 0x00 0x03 0x00 0x00
      9 
     10 # CHECK: rep
     11 # CHECK-NEXT:		stosq %rax, %es:(%rdi)
     12 0xf3 0x48 0xab
     13 
     14 # CHECK: rep
     15 # CHECK-NEXT:		stosq %rax, %es:(%edi)
     16 0xf3 0x67 0x48 0xab
     17 
     18 # CHECK: movl 32(%rbp), %eax
     19 0x8b 0x45 0x20
     20 
     21 # CHECK: movl %es:32(%rbp), %eax
     22 0x26 0x8b 0x45 0x20
     23 
     24 # CHECK: movl %es:32(%rbp), %eax
     25 0x2e 0x26 0x8b 0x45 0x20
     26 
     27 # Test that multiple prefixes stack.
     28 #    (todo- the correct disassembly is actually more like "es movl %cs:32(%rbp), %eax"
     29 #    but we don't support that)
     30 # CHECK: movl %cs:32(%rbp), %eax
     31 0x26 0x2e 0x8b 0x45 0x20
     32 
     33 # Test that 0xf3 as part of the opcode works.
     34 # CHECK: cvtdq2pd	(%rax), %xmm0
     35 0xf3 0x0f 0xe6 0x00
     36 
     37 # CHECK: pause
     38 0xf3 0x90
     39 
     40 # CHECK: nop
     41 0x90
     42 
     43 # CHECK: 		lock
     44 # CHECK-NEXT:	nop
     45 0xf0 0x90
     46 
     47 # Test that immediate is printed correctly within opsize prefix
     48 # CHECK: addw    $-12, %ax
     49 0x66,0x83,0xc0,0xf4
     50 
     51 # Test that multiple redundant prefixes work (redundant, but valid x86).
     52 # CHECK: rep
     53 # CHECK-NEXT: rep
     54 # CHECK-NEXT: stosq
     55 0xf3 0xf3 0x48 0xab
     56 
     57 
     58 # Test that we can disassembler control registers above CR8
     59 # CHECK: movq %cr15, %rax
     60 0x44 0x0f 0x20 0xf8
     61 # CHECK: movq %dr15, %rax
     62 0x44 0x0f 0x21 0xf8
     63 
     64 # Test that MMX ignore REX.R and REX.B.
     65 # CHECK: movq %mm0, %mm1
     66 0x46 0x0f 0x7f 0xc1
     67 
     68 # Test that a prefix on it's own works. It's debatable as to if this is 
     69 # something that is considered valid, but however as LLVM's own disassembler
     70 # has decided to disassemble prefixes as being separate opcodes, it therefore 
     71 # should be capable of re-consuming it's own output.
     72 # CHECK: rep
     73 0xf3
     74 # ***IMPORTANT ^-- this must be at the end of the file to be a valid test *** 
     75