[ARM] Better OR's for MVE compares
[llvm-core.git] / test / MC / AArch64 / seh.s
blobd4acc4fddb9f59b7dc1b2518d1ebf4e2a405bc74
1 // This test checks that the SEH directives emit the correct unwind data.
3 // RUN: llvm-mc -triple aarch64-pc-win32 -filetype=obj %s | llvm-readobj -S -r | FileCheck %s
5 // CHECK: Sections [
6 // CHECK: Section {
7 // CHECK: Name: .text
8 // CHECK: RelocationCount: 0
9 // CHECK: Characteristics [
10 // CHECK-NEXT: ALIGN_4BYTES
11 // CHECK-NEXT: CNT_CODE
12 // CHECK-NEXT: MEM_EXECUTE
13 // CHECK-NEXT: MEM_READ
14 // CHECK-NEXT: ]
15 // CHECK-NEXT: }
16 // CHECK: Section {
17 // CHECK: Name: .xdata
18 // CHECK: RawDataSize: 24
19 // CHECK: RelocationCount: 1
20 // CHECK: Characteristics [
21 // CHECK-NEXT: ALIGN_4BYTES
22 // CHECK-NEXT: CNT_INITIALIZED_DATA
23 // CHECK-NEXT: MEM_READ
24 // CHECK-NEXT: ]
25 // CHECK-NEXT: }
26 // CHECK: Section {
27 // CHECK: Name: .pdata
28 // CHECK: RelocationCount: 6
29 // CHECK: Characteristics [
30 // CHECK-NEXT: ALIGN_4BYTES
31 // CHECK-NEXT: CNT_INITIALIZED_DATA
32 // CHECK-NEXT: MEM_READ
33 // CHECK-NEXT: ]
34 // CHECK-NEXT: }
35 // CHECK-NEXT: ]
37 // CHECK-NEXT: Relocations [
38 // CHECK-NEXT: Section (4) .xdata {
39 // CHECK-NEXT: 0x8 IMAGE_REL_ARM64_ADDR32NB __C_specific_handler
40 // CHECK-NEXT: }
41 // CHECK-NEXT: Section (5) .pdata {
42 // CHECK-NEXT: 0x0 IMAGE_REL_ARM64_ADDR32NB func
43 // CHECK-NEXT: 0x4 IMAGE_REL_ARM64_ADDR32NB .xdata
44 // CHECK-NEXT: 0x8 IMAGE_REL_ARM64_ADDR32NB func
45 // CHECK-NEXT: 0xC IMAGE_REL_ARM64_ADDR32NB .xdata
46 // CHECK-NEXT: 0x10 IMAGE_REL_ARM64_ADDR32NB smallFunc
47 // CHECK-NEXT: 0x14 IMAGE_REL_ARM64_ADDR32NB .xdata
48 // CHECK-NEXT: }
49 // CHECK-NEXT: ]
52 .text
53 .globl func
54 .def func
55 .scl 2
56 .type 32
57 .endef
58 .seh_proc func
59 func:
60 sub sp, sp, #24
61 .seh_stackalloc 24
62 mov x29, sp
63 .seh_endprologue
64 .seh_handler __C_specific_handler, @except
65 .seh_handlerdata
66 .long 0
67 .text
68 .seh_startchained
69 .seh_endprologue
70 .seh_endchained
71 add sp, sp, #24
72 ret
73 .seh_endproc
75 // Test emission of small functions.
76 .globl smallFunc
77 .def smallFunc
78 .scl 2
79 .type 32
80 .endef
81 .seh_proc smallFunc
82 smallFunc:
83 ret
84 .seh_endproc