Home | History | Annotate | Download | only in X86
      1 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin10.0 %s | llvm-objdump -unwind-info - | FileCheck %s
      2 
      3 	.section	__TEXT,__text,regular,pure_instructions
      4 	.macosx_version_min 10, 10
      5 
      6 # Check that we emit compact-unwind info with UNWIND_X86_MODE_STACK_IND encoding
      7 
      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
     13 	.globl	_test0
     14 _test0:                                  ## @test0
     15 	.cfi_startproc
     16 ## BB#0:                                ## %entry
     17 	pushq	%rbp
     18 Ltmp0:
     19 	.cfi_def_cfa_offset 16
     20 	pushq	%rbx
     21 Ltmp1:
     22 	.cfi_def_cfa_offset 24
     23 	subq	$14408, %rsp            ## imm = 0x3848
     24 Ltmp2:
     25 	.cfi_def_cfa_offset 14432
     26 Ltmp3:
     27 	.cfi_offset %rbx, -24
     28 Ltmp4:
     29 	.cfi_offset %rbp, -16
     30 	xorl	%eax, %eax
     31 	addq	$14408, %rsp            ## imm = 0x3848
     32 	popq	%rbx
     33 	popq	%rbp
     34 	retq
     35 	.cfi_endproc
     36 
     37 # Check that we emit compact-unwind info with UNWIND_X86_MODE_STACK_IMMD encoding
     38 
     39 # CHECK:   Entry at offset 0x20:
     40 # CHECK-NEXT:     start:                0x15 _test1
     41 # CHECK-NEXT:     length:               0x15
     42 # CHECK-NEXT:     compact encoding:     0x02360804
     43 	.globl	_test1
     44 _test1:                                  ## @test1
     45 	.cfi_startproc
     46 ## BB#0:                                ## %entry
     47 	pushq	%rbp
     48 Ltmp10:
     49 	.cfi_def_cfa_offset 16
     50 	pushq	%rbx
     51 Ltmp11:
     52 	.cfi_def_cfa_offset 24
     53 	subq	$408, %rsp              ## imm = 0x198
     54 Ltmp12:
     55 	.cfi_def_cfa_offset 432
     56 Ltmp13:
     57 	.cfi_offset %rbx, -24
     58 Ltmp14:
     59 	.cfi_offset %rbp, -16
     60 	xorl	%eax, %eax
     61 	addq	$408, %rsp              ## imm = 0x198
     62 	popq	%rbx
     63 	popq	%rbp
     64 	retq
     65 	.cfi_endproc
     66 
     67 	.section	__TEXT,__cstring,cstring_literals
     68 L_.str:                                 ## @.str
     69 	.asciz	"%d\n"
     70 
     71 
     72 .subsections_via_symbols
     73