From 5bfbfb48b5e92b2cdd6832b09051ac41c6549534 Mon Sep 17 00:00:00 2001 From: "Andrew V. Tischenko" Date: Tue, 17 Oct 2017 08:49:47 +0000 Subject: [PATCH] More tests with x86 prefixes which work after rL315899 commit llvm-svn: 315983 --- llvm/test/MC/Disassembler/X86/prefixes-i386.txt | 87 +++++++++++++++++++++++ llvm/test/MC/Disassembler/X86/prefixes-x86_64.txt | 38 ++++++++++ 2 files changed, 125 insertions(+) create mode 100644 llvm/test/MC/Disassembler/X86/prefixes-i386.txt create mode 100644 llvm/test/MC/Disassembler/X86/prefixes-x86_64.txt diff --git a/llvm/test/MC/Disassembler/X86/prefixes-i386.txt b/llvm/test/MC/Disassembler/X86/prefixes-i386.txt new file mode 100644 index 0000000..ff2fb22 --- /dev/null +++ b/llvm/test/MC/Disassembler/X86/prefixes-i386.txt @@ -0,0 +1,87 @@ +# RUN: llvm-mc --disassemble %s -triple=i386-apple-darwin9 | FileCheck %s + +# CHECK: movl %fs:24, %eax +0x64 0xa1 0x18 0x00 0x00 0x00 # mov eax, dword ptr fs:[18h] + +# CHECK: rep +# CHECK-NEXT: insb %dx, %es:(%edi) +0xf3 0x6c #rep ins +# CHECK: rep +# CHECK-NEXT: insl %dx, %es:(%edi) +0xf3 0x6d #rep ins +# CHECK: rep +# CHECK-NEXT: movsb (%esi), %es:(%edi) +0xf3 0xa4 #rep movs +# CHECK: rep +# CHECK-NEXT: movsl (%esi), %es:(%edi) +0xf3 0xa5 #rep movs +# CHECK: rep +# CHECK-NEXT: outsb (%esi), %dx +0xf3 0x6e #rep outs +# CHECK: rep +# CHECK-NEXT: outsl (%esi), %dx +0xf3 0x6f #rep outs +# CHECK: rep +# CHECK-NEXT: lodsb (%esi), %al +0xf3 0xac #rep lods +# CHECK: rep +# CHECK-NEXT: lodsl (%esi), %eax +0xf3 0xad #rep lods +# CHECK: rep +# CHECK-NEXT: stosb %al, %es:(%edi) +0xf3 0xaa #rep stos +# CHECK: rep +# CHECK-NEXT: stosl %eax, %es:(%edi) +0xf3 0xab #rep stos +# CHECK: rep +# CHECK-NEXT: cmpsb %es:(%edi), (%esi) +0xf3 0xa6 #rep cmps +# CHECK: rep +# CHECK-NEXT: cmpsl %es:(%edi), (%esi) +0xf3 0xa7 #repe cmps +# CHECK: rep +# CHECK-NEXT: scasb %es:(%edi), %al +0xf3 0xae #repe scas +# CHECK: rep +# CHECK-NEXT: scasl %es:(%edi), %eax +0xf3 0xaf #repe scas +# CHECK: repne +# CHECK-NEXT: cmpsb %es:(%edi), (%esi) +0xf2 0xa6 #repne cmps +# CHECK: repne +# CHECK-NEXT: cmpsl %es:(%edi), (%esi) +0xf2 0xa7 #repne cmps +# CHECK: repne +# CHECK-NEXT: scasb %es:(%edi), %al +0xf2 0xae #repne scas +# CHECK: repne +# CHECK-NEXT: scasl %es:(%edi), %eax +0xf2 0xaf #repne scas + +# CHECK: repne +# CHECK-NEXT: scasw %es:(%edi), %ax +0xf2 0x66 0xaf +# CHECK: repne +# CHECK-NEXT: scasw %es:(%edi), %ax +0x66 0xf2 0xaf + +# CHECK: rep +# CHECK-NEXT: scasw %es:(%edi), %ax +0xf3 0x66 0xaf +# CHECK: rep +# CHECK-NEXT: scasw %es:(%edi), %ax +0x66 0xf3 0xaf + +# CHECK: repne +# CHECK: insw %dx, %es:(%edi) +0xf2 0x66 0x6d +# CHECK: repne +# CHECK: insw %dx, %es:(%edi) +0x66 0xf2 0x6d + +# CHECK: rep +# CHECK: insw %dx, %es:(%edi) +0xf3 0x66 0x6d +# CHECK: rep +# CHECK: insw %dx, %es:(%edi) +0x66 0xf3 0x6d diff --git a/llvm/test/MC/Disassembler/X86/prefixes-x86_64.txt b/llvm/test/MC/Disassembler/X86/prefixes-x86_64.txt new file mode 100644 index 0000000..7a9208f --- /dev/null +++ b/llvm/test/MC/Disassembler/X86/prefixes-x86_64.txt @@ -0,0 +1,38 @@ +# RUN: llvm-mc --disassemble %s -triple=x86_64 | FileCheck %s + +# CHECK: mulsd %xmm7, %xmm7 +0x66 0xF3 0xF2 0x0F 0x59 0xFF +# CHECK: mulss %xmm7, %xmm7 +0x66 0xF2 0xF3 0x0F 0x59 0xFF +# CHECK: mulpd %xmm7, %xmm7 +0x66 0x0F 0x59 0xFF +# CHECK: mulsd %xmm7, %xmm7 +0xf2 0x66 0x0f 0x59 0xff + +# CHECK: repne +# CHECK-NEXT: scasw %es:(%rdi), %ax +0xf2 0x66 0xaf +# CHECK: rep +# CHECK-NEXT: scasw %es:(%rdi), %ax +0x66 0xf2 0xaf + +# CHECK: rep +# CHECK-NEXT: scasw %es:(%rdi), %ax +0xf3 0x66 0xaf +# CHECK: rep +# CHECK-NEXT: scasw %es:(%rdi), %ax +0x66 0xf3 0xaf + +# CHECK: repne +# CHECK: insw %dx, %es:(%rdi) +0xf2 0x66 0x6d +# CHECK: repne +# CHECK: insw %dx, %es:(%rdi) +0x66 0xf2 0x6d + +# CHECK: rep +# CHECK: insw %dx, %es:(%rdi) +0xf3 0x66 0x6d +# CHECK: rep +# CHECK: insw %dx, %es:(%rdi) +0x66 0xf3 0x6d -- 2.7.4