1 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin10.0 %s | llvm-objdump -unwind-info - | FileCheck %s
3 .section __TEXT,__text,regular,pure_instructions
4 .macosx_version_min 10, 10
6 # Check that we emit compact-unwind info with UNWIND_X86_MODE_STACK_IND encoding
8 # CHECK: Contents of __compact_unwind section:
9 # CHECK-NEXT: Entry at offset 0x0:
10 # CHECK-NEXT: start: 0x0 _test0
11 # CHECK-NEXT: length: 0x15
12 # CHECK-NEXT: compact encoding: 0x03056804
19 .cfi_def_cfa_offset 16
22 .cfi_def_cfa_offset 24
23 subq $
14408, %rsp
## imm = 0x3848
25 .cfi_def_cfa_offset 14432
31 addq $
14408, %rsp
## imm = 0x3848
37 # Check that we emit compact-unwind info with UNWIND_X86_MODE_STACK_IMMD encoding
39 # CHECK: Entry at offset 0x20:
40 # CHECK-NEXT: start: 0x15 _test1
41 # CHECK-NEXT: length: 0x15
42 # CHECK-NEXT: compact encoding: 0x02360804
49 .cfi_def_cfa_offset 16
52 .cfi_def_cfa_offset 24
53 subq $
408, %rsp
## imm = 0x198
55 .cfi_def_cfa_offset 432
61 addq $
408, %rsp
## imm = 0x198
67 # Check that a adjustment through a push %rax is the same as a sub.
69 # CHECK: Entry at offset 0x40:
70 # CHECK-NEXT: start: 0x2a _testrax
71 # CHECK-NEXT: length: 0x5
72 # CHECK-NEXT: compact encoding: 0x02020000
79 .cfi_def_cfa_offset 16
85 .section __TEXT,__cstring,cstring_literals
90 .subsections_via_symbols