summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorKevin Enderby <enderby@apple.com>2012-10-22 22:31:46 +0000
committerKevin Enderby <enderby@apple.com>2012-10-22 22:31:46 +0000
commit3ed0316f756e2f1730f46654776fcf77f5ace7aa (patch)
treec7769b081a31d4e7194751368e2090ba967bfb2b /test
parent8ee16c7b661ce0b1c1d33db07b57ad2c88b5a8b2 (diff)
downloadllvm-3ed0316f756e2f1730f46654776fcf77f5ace7aa.tar.gz
llvm-3ed0316f756e2f1730f46654776fcf77f5ace7aa.tar.bz2
llvm-3ed0316f756e2f1730f46654776fcf77f5ace7aa.tar.xz
Add support for annotated disassembly output for X86 and arm.
Per the October 12, 2012 Proposal for annotated disassembly output sent out by Jim Grosbach this set of changes implements this for X86 and arm. The llvm-mc tool now has a -mdis option to produced the marked up disassembly and a couple of small example test cases have been added. rdar://11764962 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166445 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/MC/Disassembler/ARM/marked-up-thumb.txt7
-rw-r--r--test/MC/Disassembler/X86/marked-up.txt6
2 files changed, 13 insertions, 0 deletions
diff --git a/test/MC/Disassembler/ARM/marked-up-thumb.txt b/test/MC/Disassembler/ARM/marked-up-thumb.txt
new file mode 100644
index 0000000000..d7807cde8b
--- /dev/null
+++ b/test/MC/Disassembler/ARM/marked-up-thumb.txt
@@ -0,0 +1,7 @@
+# RUN: llvm-mc -triple=thumbv7-apple-darwin -mcpu=cortex-a8 -mdis < %s | FileCheck %s
+# CHECK: ldr <reg:r4>, <imm:#32>
+0x08 0x4c
+# CHECK: push {<reg:r1>, <reg:r2>, <reg:r7>}
+0x86 0xb4
+# CHECK: sub <reg:sp>, <imm:#132>
+0xa1 0xb0
diff --git a/test/MC/Disassembler/X86/marked-up.txt b/test/MC/Disassembler/X86/marked-up.txt
new file mode 100644
index 0000000000..f0e51252f8
--- /dev/null
+++ b/test/MC/Disassembler/X86/marked-up.txt
@@ -0,0 +1,6 @@
+# RUN: llvm-mc --mdis %s -triple=x86_64-apple-darwin9 2>&1 | FileCheck %s
+
+# CHECK: movq <mem:<reg:%gs>:8>, <reg:%rcx>
+0x65 0x48 0x8b 0x0c 0x25 0x08 0x00 0x00 0x00
+# CHECK: xorps <reg:%xmm1>, <reg:%xmm2>
+0x0f 0x57 0xd1