[InstCombine] Signed saturation patterns
[llvm-complete.git] / test / MC / ARM / eh-directive-handlerdata.s
blobce87b4b2d1437dcee8309a0cee710aca8b11175c
1 @ RUN: llvm-mc %s -triple=armv7-unknown-linux-gnueabi -filetype=obj -o - \
2 @ RUN: | llvm-readobj -S --sd --sr > %t
3 @ RUN: FileCheck %s < %t
4 @ RUN: FileCheck --check-prefix=RELOC %s < %t
6 @ Check the .handlerdata directive (without .personality directive)
8 .syntax unified
10 @-------------------------------------------------------------------------------
11 @ TEST1
12 @-------------------------------------------------------------------------------
13 .section .TEST1
14 .globl func1
15 .align 2
16 .type func1,%function
17 .fnstart
18 func1:
19 bx lr
20 .handlerdata
21 .fnend
24 @ CHECK:Section {
25 @ CHECK: Name: .TEST1
26 @ CHECK: SectionData (
27 @ CHECK: 0000: 1EFF2FE1 |../.|
28 @ CHECK: )
29 @ CHECK:}
31 @ CHECK:Section {
32 @ CHECK: Name: .ARM.extab.TEST1
33 @ CHECK: SectionData (
34 @ CHECK: 0000: B0B0B080 |....|
35 @ CHECK: )
36 @ CHECK:}
38 @ CHECK:Section {
39 @ CHECK: Name: .ARM.exidx.TEST1
40 @ CHECK: SectionData (
41 @ CHECK: 0000: 00000000 00000000 |........|
42 @ CHECK: )
43 @ CHECK:}
44 @-------------------------------------------------------------------------------
45 @ We should see a relocation entry to __aeabi_unwind_cpp_pr0, so that the
46 @ linker can keep __aeabi_unwind_cpp_pr0.
47 @-------------------------------------------------------------------------------
48 @ RELOC: Section {
49 @ RELOC: Name: .rel.ARM.exidx.TEST1
50 @ RELOC: Relocations [
51 @ RELOC: 0x0 R_ARM_NONE __aeabi_unwind_cpp_pr0 0x0
52 @ RELOC: 0x0 R_ARM_PREL31 .TEST1 0x0
53 @ RELOC: 0x4 R_ARM_PREL31 .ARM.extab.TEST1 0x0
54 @ RELOC: ]
55 @ RELOC: }
59 @-------------------------------------------------------------------------------
60 @ TEST2
61 @-------------------------------------------------------------------------------
62 .section .TEST2
63 .globl func2
64 .align 2
65 .type func2,%function
66 .fnstart
67 func2:
68 @-------------------------------------------------------------------------------
69 @ Use a lot of unwind opcdes to get __aeabi_unwind_cpp_pr1.
70 @-------------------------------------------------------------------------------
71 .save {r4, r5, r6, r7, r8, r9, r10, r11, r12}
72 push {r4, r5, r6, r7, r8, r9, r10, r11, r12}
73 pop {r4, r5, r6, r7, r8, r9, r10, r11, r12}
74 .pad #0x240
75 sub sp, sp, #0x240
76 add sp, sp, #0x240
77 bx lr
78 .handlerdata
79 .fnend
83 @ CHECK:Section {
84 @ CHECK: Name: .TEST2
85 @ CHECK: SectionData (
86 @ CHECK: 0000: F01F2DE9 F01FBDE8 09DD4DE2 09DD8DE2 |..-.......M.....|
87 @ CHECK: 0010: 1EFF2FE1 |../.|
88 @ CHECK: )
89 @ CHECK:}
91 @ CHECK:Section {
92 @ CHECK: Name: .ARM.extab.TEST2
93 @ CHECK: SectionData (
94 @ CHECK: 0000: 0FB20181 B0B0FF81 |........|
95 @ CHECK: )
96 @ CHECK:}
98 @ CHECK:Section {
99 @ CHECK: Name: .ARM.exidx.TEST2
100 @ CHECK: SectionData (
101 @ CHECK: 0000: 00000000 00000000 |........|
102 @ CHECK: )
103 @ CHECK:}
104 @-------------------------------------------------------------------------------
105 @ We should see a relocation entry to __aeabi_unwind_cpp_pr0, so that the
106 @ linker can keep __aeabi_unwind_cpp_pr0.
107 @-------------------------------------------------------------------------------
108 @ RELOC: Section {
109 @ RELOC: Name: .rel.ARM.exidx.TEST2
110 @ RELOC: Relocations [
111 @ RELOC: 0x0 R_ARM_NONE __aeabi_unwind_cpp_pr1 0x0
112 @ RELOC: 0x0 R_ARM_PREL31 .TEST2 0x0
113 @ RELOC: 0x4 R_ARM_PREL31 .ARM.extab.TEST2 0x0
114 @ RELOC: ]
115 @ RELOC: }