diff options
author | Stephen Hines <srhines@google.com> | 2015-03-23 12:10:34 -0700 |
---|---|---|
committer | Stephen Hines <srhines@google.com> | 2015-03-23 12:10:34 -0700 |
commit | ebe69fe11e48d322045d5949c83283927a0d790b (patch) | |
tree | c92f1907a6b8006628a4b01615f38264d29834ea /test/MC/COFF/seh-section.s | |
parent | b7d2e72b02a4cb8034f32f8247a2558d2434e121 (diff) | |
download | external_llvm-ebe69fe11e48d322045d5949c83283927a0d790b.zip external_llvm-ebe69fe11e48d322045d5949c83283927a0d790b.tar.gz external_llvm-ebe69fe11e48d322045d5949c83283927a0d790b.tar.bz2 |
Update aosp/master LLVM for rebase to r230699.
Change-Id: I2b5be30509658cb8266be782de0ab24f9099f9b9
Diffstat (limited to 'test/MC/COFF/seh-section.s')
-rw-r--r-- | test/MC/COFF/seh-section.s | 74 |
1 files changed, 72 insertions, 2 deletions
diff --git a/test/MC/COFF/seh-section.s b/test/MC/COFF/seh-section.s index 026c0d7..c95eece 100644 --- a/test/MC/COFF/seh-section.s +++ b/test/MC/COFF/seh-section.s @@ -1,5 +1,7 @@ -// This test ensures that, if the section containing a function has a suffix -// (e.g. .text$foo), its unwind info section also has a suffix (.xdata$foo). +// This test ensures functions in custom sections get unwind info emitted in a +// distinct .xdata section. Ideally we'd just emit a second .xdata section with +// the same name and characteristics, but MC uniques sections by name and +// characteristics, so that is not possible. // RUN: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s | llvm-readobj -s -sd | FileCheck %s // CHECK: Name: .xdata$foo @@ -20,6 +22,44 @@ // CHECK-NEXT: 0000: 01050200 05500402 // CHECK-NEXT: ) +// CHECK: Name: .xdata$.mytext +// CHECK-NEXT: VirtualSize +// CHECK-NEXT: VirtualAddress +// CHECK-NEXT: RawDataSize: 8 +// CHECK-NEXT: PointerToRawData +// CHECK-NEXT: PointerToRelocations +// CHECK-NEXT: PointerToLineNumbers +// CHECK-NEXT: RelocationCount: 0 +// CHECK-NEXT: LineNumberCount: 0 +// CHECK-NEXT: Characteristics [ +// CHECK-NEXT: IMAGE_SCN_ALIGN_4BYTES +// CHECK-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA +// CHECK-NEXT: IMAGE_SCN_MEM_READ +// CHECK-NEXT: ] +// CHECK-NEXT: SectionData ( +// CHECK-NEXT: 0000: 01050200 05500402 +// CHECK-NEXT: ) + +// CHECK: Name: .xdata +// CHECK-NEXT: VirtualSize +// CHECK-NEXT: VirtualAddress +// CHECK-NEXT: RawDataSize: 8 +// CHECK-NEXT: PointerToRawData +// CHECK-NEXT: PointerToRelocations +// CHECK-NEXT: PointerToLineNumbers +// CHECK-NEXT: RelocationCount: 0 +// CHECK-NEXT: LineNumberCount: 0 +// CHECK-NEXT: Characteristics [ +// CHECK-NEXT: IMAGE_SCN_ALIGN_4BYTES +// CHECK-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA +// CHECK-NEXT: IMAGE_SCN_MEM_READ +// CHECK-NEXT: ] +// CHECK-NEXT: SectionData ( +// CHECK-NEXT: 0000: 01050200 05500402 +// CHECK-NEXT: ) + + + .section .text$foo,"x" .globl foo .def foo; .scl 2; .type 32; .endef @@ -35,3 +75,33 @@ foo: ret .seh_endproc + .section .mytext,"x" + .globl bar + .def bar; .scl 2; .type 32; .endef + .seh_proc bar +bar: + subq $8, %rsp + .seh_stackalloc 8 + pushq %rbp + .seh_pushreg %rbp + .seh_endprologue + popq %rbp + addq $8, %rsp + ret + .seh_endproc + + .section .text + .globl baz + .def baz; .scl 2; .type 32; .endef + .seh_proc baz +baz: + subq $8, %rsp + .seh_stackalloc 8 + pushq %rbp + .seh_pushreg %rbp + .seh_endprologue + popq %rbp + addq $8, %rsp + ret + .seh_endproc + |