diff options
author | Stephen Hines <srhines@google.com> | 2015-04-01 18:49:24 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2015-04-01 18:49:26 +0000 |
commit | 3fa16bd6062e23bcdb82ed4dd965674792e6b761 (patch) | |
tree | 9348fc507292f7e8715d22d64ce5a32131b4f875 /test/MC/X86/compact-unwind.s | |
parent | beed47390a60f6f0c77532b3d3f76bb47ef49423 (diff) | |
parent | ebe69fe11e48d322045d5949c83283927a0d790b (diff) | |
download | external_llvm-3fa16bd6062e23bcdb82ed4dd965674792e6b761.zip external_llvm-3fa16bd6062e23bcdb82ed4dd965674792e6b761.tar.gz external_llvm-3fa16bd6062e23bcdb82ed4dd965674792e6b761.tar.bz2 |
Merge "Update aosp/master LLVM for rebase to r230699."
Diffstat (limited to 'test/MC/X86/compact-unwind.s')
-rw-r--r-- | test/MC/X86/compact-unwind.s | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/test/MC/X86/compact-unwind.s b/test/MC/X86/compact-unwind.s new file mode 100644 index 0000000..82be239 --- /dev/null +++ b/test/MC/X86/compact-unwind.s @@ -0,0 +1,72 @@ +# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin10.0 %s | llvm-objdump -unwind-info - | FileCheck %s + + .section __TEXT,__text,regular,pure_instructions + .macosx_version_min 10, 10 + +# Check that we emit compact-unwind info with UNWIND_X86_MODE_STACK_IND encoding + +# CHECK: Contents of __compact_unwind section: +# CHECK-NEXT: Entry at offset 0x0: +# CHECK-NEXT: start: 0x0 _test0 +# CHECK-NEXT: length: 0x15 +# CHECK-NEXT: compact encoding: 0x03056804 + .globl _test0 +_test0: ## @test0 + .cfi_startproc +## BB#0: ## %entry + pushq %rbp +Ltmp0: + .cfi_def_cfa_offset 16 + pushq %rbx +Ltmp1: + .cfi_def_cfa_offset 24 + subq $14408, %rsp ## imm = 0x3848 +Ltmp2: + .cfi_def_cfa_offset 14432 +Ltmp3: + .cfi_offset %rbx, -24 +Ltmp4: + .cfi_offset %rbp, -16 + xorl %eax, %eax + addq $14408, %rsp ## imm = 0x3848 + popq %rbx + popq %rbp + retq + .cfi_endproc + +# Check that we emit compact-unwind info with UNWIND_X86_MODE_STACK_IMMD encoding + +# CHECK: Entry at offset 0x20: +# CHECK-NEXT: start: 0x15 _test1 +# CHECK-NEXT: length: 0x15 +# CHECK-NEXT: compact encoding: 0x02360804 + .globl _test1 +_test1: ## @test1 + .cfi_startproc +## BB#0: ## %entry + pushq %rbp +Ltmp10: + .cfi_def_cfa_offset 16 + pushq %rbx +Ltmp11: + .cfi_def_cfa_offset 24 + subq $408, %rsp ## imm = 0x198 +Ltmp12: + .cfi_def_cfa_offset 432 +Ltmp13: + .cfi_offset %rbx, -24 +Ltmp14: + .cfi_offset %rbp, -16 + xorl %eax, %eax + addq $408, %rsp ## imm = 0x198 + popq %rbx + popq %rbp + retq + .cfi_endproc + + .section __TEXT,__cstring,cstring_literals +L_.str: ## @.str + .asciz "%d\n" + + +.subsections_via_symbols |