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 stack pointer offsets.
6 @ The
.pad directive will track the stack pointer offsets. There are several
7 @ ways to encode the stack offsets. We have to test
:
11 @
0x04 <= offset
<= 0x100
12 @
0x104 <= offset
<= 0x200
18 @
-------------------------------------------------------------------------------
20 @
-------------------------------------------------------------------------------
31 .personality __gxx_personality_v0
35 @
-------------------------------------------------------------------------------
36 @ The assembler should emit nothing
(will
be filled up with finish opcode
).
37 @
-------------------------------------------------------------------------------
39 @ CHECK
: Name
: .ARM.extab.TEST1
40 @ CHECK
: SectionData
(
41 @ CHECK
: 0000: 00000000 B0B0B000 |
........|
47 @
-------------------------------------------------------------------------------
49 @
-------------------------------------------------------------------------------
53 .type func2a,%function
60 .personality __gxx_personality_v0
66 .type func2b,%function
73 .personality __gxx_personality_v0
77 @
-------------------------------------------------------------------------------
78 @ The assembler should emit
((offset
- 4) >> 2).
79 @
-------------------------------------------------------------------------------
81 @ CHECK
: Name
: .ARM.extab.TEST2
82 @ CHECK
: SectionData
(
83 @ CHECK
: 0000: 00000000 B0B00000
00000000 B0B03F00 |
..............?.|
88 @
-------------------------------------------------------------------------------
90 @
-------------------------------------------------------------------------------
94 .type func3a,%function
101 .personality __gxx_personality_v0
107 .type func3b,%function
114 .personality __gxx_personality_v0
118 @
-------------------------------------------------------------------------------
119 @ The assembler should emit
0x3F and ((offset
- 0x104) >> 2).
120 @
-------------------------------------------------------------------------------
122 @ CHECK
: Name
: .ARM.extab.TEST3
123 @ CHECK
: SectionData
(
124 @ CHECK
: 0000: 00000000 B03F0000
00000000 B03F3F00 |
.....?.......??.|
130 @
-------------------------------------------------------------------------------
132 @
-------------------------------------------------------------------------------
136 .type func4a,%function
143 .personality __gxx_personality_v0
149 .type func4b,%function
156 .personality __gxx_personality_v0
160 @
-------------------------------------------------------------------------------
161 @ The assembler should emit
0xB2 and the ULEB128 encoding of
162 @
((offset
- 0x204) >> 2).
163 @
-------------------------------------------------------------------------------
165 @ CHECK
: Name
: .ARM.extab.TEST4
166 @ CHECK
: SectionData
(
167 @ CHECK
: 0000: 00000000 B000B200
00000000 01DFB200 |
................|
173 @
-------------------------------------------------------------------------------
175 @
-------------------------------------------------------------------------------
179 .type func4a,%function
186 .personality __gxx_personality_v0
192 .type func5b,%function
199 .personality __gxx_personality_v0
205 .type func5c,%function
212 .personality __gxx_personality_v0
216 @
-------------------------------------------------------------------------------
217 @ The assembler should emit
(0x40 |
(-offset
- 4)) >> 2. When (-offset - 4)
218 @ is greater than
0x3f, then multiple
0x7f should
be emitted.
219 @
-------------------------------------------------------------------------------
221 @ CHECK
: Name
: .ARM.extab.TEST5
222 @ CHECK
: SectionData
(
223 @ CHECK
: 0000: 00000000 B0B04000
00000000 B07F4000 |
......@.......@.|
224 @ CHECK
: 0010: 00000000 7F7F4000 |
......@.|