[obj2yaml] - Fix a comment. NFC.
[llvm-complete.git] / test / MC / ARM / eh-directive-multiple-offsets.s
blob25c40f9420761a8598078d3252f52f3429b95335
1 @ RUN: llvm-mc %s -triple=armv7-unknown-linux-gnueabi -filetype=obj -o - \
2 @ RUN: | llvm-readobj -S --sd | FileCheck %s
4 @ Check for different combination of .setfp, .pad, .save and .vsave.
6 .syntax unified
8 @-------------------------------------------------------------------------------
9 @ TEST1: Check .pad before .setfp directive.
10 @-------------------------------------------------------------------------------
11 .section .TEST1
12 .globl func1
13 .type func1,%function
14 .align 2
15 .fnstart
16 func1:
17 .pad #12
18 sub sp, sp, #12
19 .setfp fp, sp, #8
20 add fp, sp, #8
21 sub sp, fp, #8
22 add sp, sp, #12
23 bx lr
24 .personality __gxx_personality_v0
25 .handlerdata
26 .fnend
28 @ CHECK: Section {
29 @ CHECK: Name: .ARM.extab.TEST1
30 @ CHECK: SectionData (
31 @ CHECK: 0000: 00000000 B0009B00 |........|
32 @ CHECK: )
33 @ CHECK: }
37 @-------------------------------------------------------------------------------
38 @ TEST2: Check .pad after .setfp directive.
39 @-------------------------------------------------------------------------------
40 .section .TEST2
41 .globl func2
42 .type func2,%function
43 .align 2
44 .fnstart
45 func2:
46 .setfp fp, sp, #8
47 add fp, sp, #8
48 .pad #12
49 sub sp, sp, #12
50 add sp, sp, #12
51 sub sp, fp, #8
52 bx lr
53 .personality __gxx_personality_v0
54 .handlerdata
55 .fnend
57 @ CHECK: Section {
58 @ CHECK: Name: .ARM.extab.TEST2
59 @ CHECK: SectionData (
60 @ CHECK: 0000: 00000000 B0419B00 |.....A..|
61 @ CHECK: )
62 @ CHECK: }
66 @-------------------------------------------------------------------------------
67 @ TEST3: Check .setfp, .pad, .setfp directive.
68 @-------------------------------------------------------------------------------
69 .section .TEST3
70 .globl func3
71 .type func3,%function
72 .align 2
73 .fnstart
74 func3:
75 @ prologue:
76 .setfp fp, sp, #4
77 add fp, sp, #4
78 .pad #8
79 sub sp, sp, #8
80 .setfp fp, sp, #4
81 add fp, sp, #4
83 @ epilogue:
84 add sp, fp, #4
85 bx lr
86 .personality __gxx_personality_v0
87 .handlerdata
88 .fnend
90 @ CHECK: Section {
91 @ CHECK: Name: .ARM.extab.TEST3
92 @ CHECK: SectionData (
93 @ CHECK: 0000: 00000000 B0009B00 |........|
94 @ CHECK: )
95 @ CHECK: }
99 @-------------------------------------------------------------------------------
100 @ TEST4: Check ".setfp fp, sp" and ".setfp fp, fp" directive.
101 @-------------------------------------------------------------------------------
102 .section .TEST4
103 .globl func4
104 .type func4,%function
105 .align 2
106 .fnstart
107 func4:
108 @ prologue:
109 .setfp fp, sp, #8
110 add fp, sp, #8
111 .setfp fp, fp, #8
112 add fp, fp, #8
114 @ epilogue:
115 sub sp, fp, #16
116 bx lr
117 .personality __gxx_personality_v0
118 .handlerdata
119 .fnend
121 @ CHECK: Section {
122 @ CHECK: Name: .ARM.extab.TEST4
123 @ CHECK: SectionData (
124 @ CHECK: 0000: 00000000 B0439B00 |.....C..|
125 @ CHECK: )
126 @ CHECK: }
130 @-------------------------------------------------------------------------------
131 @ TEST5: Check .setfp, .save, .setfp directive.
132 @-------------------------------------------------------------------------------
133 .section .TEST5
134 .globl func5
135 .type func5,%function
136 .align 2
137 .fnstart
138 func5:
139 @ prologue:
140 .setfp fp, sp, #16
141 add fp, sp, #16
142 .save {r4, r5, r6, r7, r8}
143 push {r4, r5, r6, r7, r8}
144 .pad #8
145 add sp, sp, #8
146 .pad #8
147 sub sp, sp, #8
148 .save {r9, r10}
149 push {r9, r10}
150 .setfp fp, sp, #24
151 add fp, sp, #24
153 @ epilogue:
154 sub sp, fp, #24
155 pop {r9, r10}
156 add sp, sp, #16
157 pop {r4, r5, r6, r7, r8}
158 bx lr
159 .personality __gxx_personality_v0
160 .handlerdata
161 .fnend
163 @ CHECK: Section {
164 @ CHECK: Name: .ARM.extab.TEST5
165 @ CHECK: SectionData (
166 @ CHECK: 0000: 00000000 80459B01 B0A40360 |.....E.....`|
167 @ CHECK: )
168 @ CHECK: }