summaryrefslogtreecommitdiff
path: root/test/DebugInfo
diff options
context:
space:
mode:
authorTim Northover <Tim.Northover@arm.com>2013-04-27 11:56:14 +0000
committerTim Northover <Tim.Northover@arm.com>2013-04-27 11:56:14 +0000
commitd57342190d40d089b4ddd703900af7cb028088c6 (patch)
tree17964c771b5476217b36988222542a900b77a89f /test/DebugInfo
parent2c2e85536d5020db3f64ab73b56ebe1bfd9aeb73 (diff)
downloadllvm-d57342190d40d089b4ddd703900af7cb028088c6.tar.gz
llvm-d57342190d40d089b4ddd703900af7cb028088c6.tar.bz2
llvm-d57342190d40d089b4ddd703900af7cb028088c6.tar.xz
AArch64: convert MC-layer test to .s file
The CodeGen aspects of this test are already covered by cfi-frame.ll; making it an assembly file reduces the risk of incidental changes affecting the test. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180671 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/DebugInfo')
-rw-r--r--test/DebugInfo/AArch64/eh_frame.ll51
-rw-r--r--test/DebugInfo/AArch64/eh_frame.s48
2 files changed, 48 insertions, 51 deletions
diff --git a/test/DebugInfo/AArch64/eh_frame.ll b/test/DebugInfo/AArch64/eh_frame.ll
deleted file mode 100644
index 2539c56fa1..0000000000
--- a/test/DebugInfo/AArch64/eh_frame.ll
+++ /dev/null
@@ -1,51 +0,0 @@
-; RUN: llc -verify-machineinstrs -mtriple=aarch64-none-linux-gnu %s -filetype=obj -o %t
-; RUN: llvm-objdump -s %t | FileCheck %s
-@var = global i32 0
-
-declare void @bar()
-
-define i64 @check_largest_class(i32 %in) {
- %res = load i32* @var
- call void @bar()
- %ext = zext i32 %res to i64
- ret i64 %ext
-}
-
-; The really key points we're checking here are:
-; * Return register is x30.
-; * Pointer format is 0x1b (GNU doesn't appear to understand others).
-
-; The rest is largely incidental, but not expected to change regularly.
-
-; Output is:
-
-; CHECK: Contents of section .eh_frame:
-; CHECK-NEXT: 0000 10000000 00000000 017a5200 017c1e01 .........zR..|..
-; CHECK-NEXT: 0010 1b0c1f00 18000000 18000000 00000000 ................
-
-
-; Won't check the rest, it's rather incidental.
-; 0020 24000000 00440c1f 10449e02 93040000 $....D...D......
-
-
-; The first CIE:
-; -------------------
-; 10000000: length of first CIE = 0x10
-; 00000000: This is a CIE
-; 01: version = 0x1
-; 7a 52 00: augmentation string "zR" -- pointer format is specified
-; 01: code alignment factor 1
-; 7c: data alignment factor -4
-; 1e: return address register 30 (== x30).
-; 01: 1 byte of augmentation
-; 1b: pointer format 1b: DW_EH_PE_pcrel | DW_EH_PE_sdata4
-; 0c 1f 00: initial instructions: "DW_CFA_def_cfa x31 ofs 0" in this case
-
-; Next the FDE:
-; -------------
-; 18000000: FDE length 0x18
-; 18000000: Uses CIE 0x18 backwards (only coincidentally same as above)
-; 00000000: PC begin for this FDE is at 00000000 (relocation is applied here)
-; 24000000: FDE applies up to PC begin+0x24
-; 00: Augmentation string length 0 for this FDE
-; Rest: call frame instructions
diff --git a/test/DebugInfo/AArch64/eh_frame.s b/test/DebugInfo/AArch64/eh_frame.s
new file mode 100644
index 0000000000..d8d6b6d932
--- /dev/null
+++ b/test/DebugInfo/AArch64/eh_frame.s
@@ -0,0 +1,48 @@
+// RUN: llvm-mc -triple aarch64-none-linux-gnu -filetype=obj %s -o %t
+// RUN: llvm-objdump -s %t | FileCheck %s
+ .text
+ .globl foo
+ .type foo,@function
+foo:
+ .cfi_startproc
+ ret
+ .cfi_endproc
+
+// The really key points we're checking here are:
+// * Return register is x30.
+// * Pointer format is 0x1b (GNU doesn't appear to understand others).
+
+// The rest is largely incidental, but not expected to change regularly.
+
+// Output is:
+
+// CHECK: Contents of section .eh_frame:
+// CHECK-NEXT: 0000 10000000 00000000 017a5200 017c1e01 .........zR..|..
+// CHECK-NEXT: 0010 1b0c1f00 10000000 18000000 00000000 ................
+
+
+// Won't check the rest, it's rather incidental.
+// 0020 04000000 00000000 ........
+
+
+
+// The first CIE:
+// -------------------
+// 10000000: length of first CIE = 0x10
+// 00000000: This is a CIE
+// 01: version = 0x1
+// 7a 52 00: augmentation string "zR" -- pointer format is specified
+// 01: code alignment factor 1
+// 7c: data alignment factor -4
+// 1e: return address register 30 (== x30).
+// 01: 1 byte of augmentation
+// 1b: pointer format 1b: DW_EH_PE_pcrel | DW_EH_PE_sdata4
+// 0c 1f 00: initial instructions: "DW_CFA_def_cfa x31 ofs 0" in this case
+
+// Next the FDE:
+// -------------
+// 10000000: FDE length 0x10
+// 18000000: Uses CIE 0x18 backwards (only coincidentally same as above)
+// 00000000: PC begin for this FDE is at 00000000 (relocation is applied here)
+// 04000000: FDE applies up to PC begin+0x14
+// 00: Augmentation string length 0 for this FDE