summaryrefslogtreecommitdiff
path: root/test/Object/X86
diff options
context:
space:
mode:
authorAhmed Bougacha <ahmed.bougacha@gmail.com>2013-08-21 19:40:22 +0000
committerAhmed Bougacha <ahmed.bougacha@gmail.com>2013-08-21 19:40:22 +0000
commita68512f68fc9adf8158955fc432973953f034e3d (patch)
tree528e1af4f16a213261748683e55271a05e38181e /test/Object/X86
parentd6dbd6b88341f1f7492b8c170077cbbb2014f1e0 (diff)
Add testcase for r188873: MCTextAtom boundaries.
Check that they are correctly computed if the last instruction is larger than 1 byte. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188923 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Object/X86')
-rw-r--r--test/Object/X86/objdump-cfg-textatomsize.yaml39
1 files changed, 39 insertions, 0 deletions
diff --git a/test/Object/X86/objdump-cfg-textatomsize.yaml b/test/Object/X86/objdump-cfg-textatomsize.yaml
new file mode 100644
index 00000000000..87cb4e13ec1
--- /dev/null
+++ b/test/Object/X86/objdump-cfg-textatomsize.yaml
@@ -0,0 +1,39 @@
+# RUN: yaml2obj -format=elf %s | llvm-objdump -d -yaml-cfg=%t - && FileCheck --check-prefix=CFG < %t %s
+# REQUIRES: shell
+#
+# Generated from:
+# main:
+# .LBL0_1:
+# jmp .LBL0_1
+#
+
+!ELF
+FileHeader:
+ Class: ELFCLASS64
+ Data: ELFDATA2LSB
+ Type: ET_REL
+ Machine: EM_X86_64
+Sections:
+ - Name: .text
+ Type: SHT_PROGBITS
+ Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
+ Content: "EBFE"
+
+## 0000000000000000 <main>:
+
+#CFG: Atoms:
+#CFG: - StartAddress: 0x0000000000000000
+#CFG: Size: 2
+
+## 0: eb fe jmp $-2
+#CFG: - Inst: JMP_1
+#CFG: Size: 2
+#CFG: Ops: [ I-2 ]
+
+Symbols:
+ Global:
+ - Name: main
+ Type: STT_FUNC
+ Section: .text
+ Value: 0x0
+ Size: 2