1 // This test checks the alignment and padding of the unwind info.
3 // RUN: llvm-mc -triple x86_64-pc-win32 -filetype=obj %s | llvm-readobj -s -sd -sr -u | FileCheck %s
8 // CHECK: RawDataSize: 16
9 // CHECK: RelocationCount: 1
10 // CHECK: Characteristics [
11 // CHECK-NEXT: ALIGN_4BYTES
12 // CHECK-NEXT: CNT_INITIALIZED_DATA
13 // CHECK-NEXT: MEM_READ
15 // CHECK: Relocations [
16 // CHECK-NEXT: [[HandlerDisp:0x[A-F0-9]+]] IMAGE_REL_AMD64_ADDR32NB __C_specific_handler
18 // CHECK: SectionData (
19 // CHECK-NEXT: 0000: 09000100 04220000 00000000 BEBAFECA
22 // CHECK-NEXT: Section {
23 // CHECK: Name: .pdata
24 // CHECK: RawDataSize: 12
25 // CHECK: RelocationCount: 3
26 // CHECK: Characteristics [
27 // CHECK-NEXT: IMAGE_SCN_ALIGN_4BYTES
28 // CHECK-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA
29 // CHECK-NEXT: IMAGE_SCN_MEM_READ
31 // CHECK: Relocations [
32 // CHECK-NEXT: [[BeginDisp:0x[A-F0-9]+]] IMAGE_REL_AMD64_ADDR32NB func
33 // CHECK-NEXT: [[EndDisp:0x[A-F0-9]+]] IMAGE_REL_AMD64_ADDR32NB func
34 // CHECK-NEXT: [[UnwindDisp:0x[A-F0-9]+]] IMAGE_REL_AMD64_ADDR32NB .xdata
36 // CHECK: SectionData (
37 // CHECK-NEXT: 0000: FCFFFFFF 05000000 00000000
41 // CHECK: UnwindInformation [
42 // CHECK-NEXT: RuntimeFunction {
43 // CHECK-NEXT: StartAddress: func {{(\+0x[A-F0-9]+ )?}}([[BeginDisp]])
44 // CHECK-NEXT: EndAddress: func {{(\+0x[A-F0-9]+ )?}}([[EndDisp]])
45 // CHECK-NEXT: UnwindInfoAddress: .xdata {{(\+0x[A-F0-9]+ )?}}([[UnwindDisp]])
46 // CHECK-NEXT: UnwindInfo {
47 // CHECK-NEXT: Version: 1
48 // CHECK-NEXT: Flags [
49 // CHECK-NEXT: ExceptionHandler
51 // CHECK-NEXT: PrologSize: 0
52 // CHECK-NEXT: FrameRegister: -
53 // CHECK-NEXT: FrameOffset: -
54 // CHECK-NEXT: UnwindCodeCount: 1
55 // CHECK-NEXT: UnwindCodes [
56 // CHECK-NEXT: 0x04: ALLOC_SMALL size=24
58 // CHECK-NEXT: Handler: __C_specific_handler ([[HandlerDisp]])
63 // Generates only one unwind code.
64 // Requires padding of the unwind code array.
66 .def func; .scl 2; .type 32; .endef
70 .seh_handler __C_specific_handler, @except