aboutsummaryrefslogtreecommitdiff
path: root/test/MC/MachO/debug_frame.s
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2011-06-12 15:42:51 +0000
committerDimitry Andric <dim@FreeBSD.org>2011-06-12 15:42:51 +0000
commit56fe8f14099930935e3870e3e823c322a85c1c89 (patch)
treeb3032e51d630e8070e9e08d6641648f195316a80 /test/MC/MachO/debug_frame.s
parent6b943ff3a3f8617113ecbf611cf0f8957e4e19d2 (diff)
downloadsrc-56fe8f14099930935e3870e3e823c322a85c1c89.tar.gz
src-56fe8f14099930935e3870e3e823c322a85c1c89.zip
Vendor import of llvm trunk r132879:vendor/llvm/llvm-r132879
Notes
Notes: svn path=/vendor/llvm/dist/; revision=223013 svn path=/vendor/llvm/llvm-r132879/; revision=223014; tag=vendor/llvm/llvm-r132879
Diffstat (limited to 'test/MC/MachO/debug_frame.s')
-rw-r--r--test/MC/MachO/debug_frame.s38
1 files changed, 38 insertions, 0 deletions
diff --git a/test/MC/MachO/debug_frame.s b/test/MC/MachO/debug_frame.s
new file mode 100644
index 000000000000..47264ef87991
--- /dev/null
+++ b/test/MC/MachO/debug_frame.s
@@ -0,0 +1,38 @@
+// RUN: llvm-mc -triple i386-apple-darwin %s -filetype=obj -o - | macho-dump | FileCheck %s
+
+// Check that we don't produce a relocation for the CIE pointer and therefore
+// we have only one relocation in __debug_frame.
+
+ .section __TEXT,__text,regular,pure_instructions
+ .globl _f
+ .align 4, 0x90
+_f: ## @f
+Ltmp0:
+ .cfi_startproc
+## BB#0: ## %entry
+ movl $42, %eax
+ ret
+Ltmp1:
+ .cfi_endproc
+Leh_func_end0:
+
+ .cfi_sections .debug_frame
+Ltext_end:
+
+// CHECK: (('section_name', '__debug_frame\x00\x00\x00')
+// CHECK-NEXT: ('segment_name', '__DWARF\x00\x00\x00\x00\x00\x00\x00\x00\x00')
+// CHECK-NEXT: ('address', 8)
+// CHECK-NEXT: ('size', 36)
+// CHECK-NEXT: ('offset', 332)
+// CHECK-NEXT: ('alignment', 2)
+// CHECK-NEXT: ('reloc_offset', 368)
+// CHECK-NEXT: ('num_reloc', 1)
+// CHECK-NEXT: ('flags', 0x2000000)
+// CHECK-NEXT: ('reserved1', 0)
+// CHECK-NEXT: ('reserved2', 0)
+// CHECK-NEXT: ),
+// CHECK-NEXT: ('_relocations', [
+// CHECK-NEXT: # Relocation 0
+// CHECK-NEXT: (('word-0', 0x1c),
+// CHECK-NEXT: ('word-1', 0x4000001)),
+// CHECK-NEXT: ])