llvm.org GIT mirror llvm / 12f33da
MC: support different sized constants in constant pools On AArch64 the pseudo instruction ldr <reg>, =... supports both 32-bit and 64-bit constants. Add support for 64 bit constants for the pools to support the pseudo instruction fully. Changes the AArch64 ldr-pseudo tests to use 32-bit registers and adds tests with 64-bit registers. Patch by Janne Grunau! Differential Revision: http://reviews.llvm.org/D4279 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213387 91177308-0d34-0410-b5e6-96231b3b80d8 David Peixotto 5 years ago
10 changed file(s) with 225 addition(s) and 92 deletion(s). Raw diff Collapse all Expand all
2121 class MCSection;
2222 class MCStreamer;
2323 class MCSymbol;
24
25 struct ConstantPoolEntry {
26 MCSymbol *Label;
27 const MCExpr *Value;
28 unsigned Size;
29 };
30
2431 // A class to keep track of assembler-generated constant pools that are use to
2532 // implement the ldr-pseudo.
2633 class ConstantPool {
27 typedef SmallVector<std::pair, 4> EntryVecTy;
34 typedef SmallVector<ConstantPoolEntry, 4> EntryVecTy;
2835 EntryVecTy Entries;
2936
3037 public:
3340
3441 // Add a new entry to the constant pool in the next slot.
3542 // \param Value is the new entry to put in the constant pool.
43 // \param Size is the size in bytes of the entry
3644 //
3745 // \returns a MCExpr that references the newly inserted value
38 const MCExpr *addEntry(const MCExpr *Value, MCContext &Context);
46 const MCExpr *addEntry(const MCExpr *Value, MCContext &Context,
47 unsigned Size);
3948
4049 // Emit the contents of the constant pool using the provided streamer.
4150 void emitEntries(MCStreamer &Streamer);
6877
6978 void emitAll(MCStreamer &Streamer);
7079 void emitForCurrentSection(MCStreamer &Streamer);
71 const MCExpr *addEntry(MCStreamer &Streamer, const MCExpr *Expr);
80 const MCExpr *addEntry(MCStreamer &Streamer, const MCExpr *Expr,
81 unsigned Size);
7282
7383 private:
7484 ConstantPool *getConstantPool(const MCSection *Section);
9696 /// Callback used to implement the ldr= pseudo.
9797 /// Add a new entry to the constant pool for the current section and return an
9898 /// MCExpr that can be used to refer to the constant pool location.
99 const MCExpr *addConstantPoolEntry(const MCExpr *);
99 const MCExpr *addConstantPoolEntry(const MCExpr *, unsigned Size);
100100
101101 /// Callback used to implemnt the .ltorg directive.
102102 /// Emit contents of constant pool for the current section.
2323 void ConstantPool::emitEntries(MCStreamer &Streamer) {
2424 if (Entries.empty())
2525 return;
26 Streamer.EmitCodeAlignment(4); // align to 4-byte address
2726 Streamer.EmitDataRegion(MCDR_DataRegion);
2827 for (EntryVecTy::const_iterator I = Entries.begin(), E = Entries.end();
2928 I != E; ++I) {
30 Streamer.EmitLabel(I->first);
31 Streamer.EmitValue(I->second, 4);
29 Streamer.EmitCodeAlignment(I->Size); // align naturally
30 Streamer.EmitLabel(I->Label);
31 Streamer.EmitValue(I->Value, I->Size);
3232 }
3333 Streamer.EmitDataRegion(MCDR_DataRegionEnd);
3434 Entries.clear();
3535 }
3636
37 const MCExpr *ConstantPool::addEntry(const MCExpr *Value, MCContext &Context) {
37 const MCExpr *ConstantPool::addEntry(const MCExpr *Value, MCContext &Context,
38 unsigned Size) {
3839 MCSymbol *CPEntryLabel = Context.CreateTempSymbol();
3940
40 Entries.push_back(std::make_pair(CPEntryLabel, Value));
41 Entries.push_back( { CPEntryLabel, Value, Size } );
4142 return MCSymbolRefExpr::Create(CPEntryLabel, Context);
4243 }
4344
8889 }
8990
9091 const MCExpr *AssemblerConstantPools::addEntry(MCStreamer &Streamer,
91 const MCExpr *Expr) {
92 const MCExpr *Expr,
93 unsigned Size) {
9294 const MCSection *Section = Streamer.getCurrentSection().first;
93 return getOrCreateConstantPool(Section).addEntry(Expr, Streamer.getContext());
95 return getOrCreateConstantPool(Section).addEntry(Expr, Streamer.getContext(),
96 Size);
9497 }
2424 #include "llvm/Support/TargetRegistry.h"
2525 #include "llvm/Support/ErrorHandling.h"
2626 #include "llvm/Support/raw_ostream.h"
27 #include "llvm/ADT/APInt.h"
2728 #include "llvm/ADT/SmallString.h"
2829 #include "llvm/ADT/SmallVector.h"
2930 #include "llvm/ADT/STLExtras.h"
30663067 if (getParser().parseExpression(SubExprVal))
30673068 return true;
30683069
3070 if (Operands.size() < 2 ||
3071 !static_cast(*Operands[1]).isReg())
3072 return true;
3073
3074 bool IsXReg =
3075 AArch64MCRegisterClasses[AArch64::GPR64allRegClassID].contains(
3076 Operands[1]->getReg());
3077
30693078 MCContext& Ctx = getContext();
30703079 E = SMLoc::getFromPointer(Loc.getPointer() - 1);
30713080 // If the op is an imm and can be fit into a mov, then replace ldr with mov.
3072 if (isa(SubExprVal) && Operands.size() >= 2 &&
3073 static_cast(*Operands[1]).isReg()) {
3074 bool IsXReg = AArch64MCRegisterClasses[AArch64::GPR64allRegClassID].contains(
3075 Operands[1]->getReg());
3081 if (isa(SubExprVal)) {
30763082 uint64_t Imm = (cast(SubExprVal))->getValue();
30773083 uint32_t ShiftAmt = 0, MaxShiftAmt = IsXReg ? 48 : 16;
30783084 while(Imm > 0xFFFF && countTrailingZeros(Imm) >= 16) {
30883094 ShiftAmt, true, S, E, Ctx));
30893095 return false;
30903096 }
3097 APInt Simm = APInt(64, Imm << ShiftAmt);
3098 // check if the immediate is an unsigned or signed 32-bit int for W regs
3099 if (!IsXReg && !(Simm.isIntN(32) || Simm.isSignedIntN(32)))
3100 return Error(Loc, "Immediate too large for register");
30913101 }
30923102 // If it is a label or an imm that cannot fit in a movz, put it into CP.
3093 const MCExpr *CPLoc = getTargetStreamer().addConstantPoolEntry(SubExprVal);
3103 const MCExpr *CPLoc =
3104 getTargetStreamer().addConstantPoolEntry(SubExprVal, IsXReg ? 8 : 4);
30943105 Operands.push_back(AArch64Operand::CreateImm(CPLoc, S, E, Ctx));
30953106 return false;
30963107 }
2727
2828 // The constant pool handling is shared by all AArch64TargetStreamer
2929 // implementations.
30 const MCExpr *AArch64TargetStreamer::addConstantPoolEntry(const MCExpr *Expr) {
31 return ConstantPools->addEntry(Streamer, Expr);
30 const MCExpr *AArch64TargetStreamer::addConstantPoolEntry(const MCExpr *Expr,
31 unsigned Size) {
32 return ConstantPools->addEntry(Streamer, Expr, Size);
3233 }
3334
3435 void AArch64TargetStreamer::emitCurrentConstantPool() {
2727 // The constant pool handling is shared by all ARMTargetStreamer
2828 // implementations.
2929 const MCExpr *ARMTargetStreamer::addConstantPoolEntry(const MCExpr *Expr) {
30 return ConstantPools->addEntry(Streamer, Expr);
30 return ConstantPools->addEntry(Streamer, Expr, 4);
3131 }
3232
3333 void ARMTargetStreamer::emitCurrentConstantPool() {
0 //RUN: not llvm-mc -triple=aarch64-linux-gnu - < %s 2>&1 | FileCheck --check-prefix=CHECK-ERROR %s
1
2 // simple test
3 .section a, "ax", @progbits
4 f1:
5 ldr w0, =0x100000001
6 // CHECK-ERROR: error: Immediate too large for register
7 // CHECK-ERROR: ldr w0, =0x100000001
8 // CHECK-ERROR: ^
9 f2:
10 ldr w0, =-0x80000001
11 // CHECK-ERROR: error: Immediate too large for register
12 // CHECK-ERROR: ldr w0, =-0x80000001
13 // CHECK-ERROR: ^
2222 .section b,"ax",@progbits
2323 // CHECK-LABEL: f3:
2424 f3:
25 ldr x0, =0x10001
26 // CHECK: ldr x0, .Ltmp[[TMP0:[0-9]+]]
25 ldr w0, =0x10001
26 // CHECK: ldr w0, .Ltmp[[TMP0:[0-9]+]]
2727
2828 // loading multiple constants
2929 .section c,"ax",@progbits
3030 // CHECK-LABEL: f4:
3131 f4:
32 ldr x0, =0x10002
33 // CHECK: ldr x0, .Ltmp[[TMP1:[0-9]+]]
34 adds x0, x0, #1
35 adds x0, x0, #1
36 adds x0, x0, #1
37 adds x0, x0, #1
38 ldr x0, =0x10003
39 // CHECK: ldr x0, .Ltmp[[TMP2:[0-9]+]]
32 ldr w0, =0x10002
33 // CHECK: ldr w0, .Ltmp[[TMP1:[0-9]+]]
34 adds x0, x0, #1
35 adds x0, x0, #1
36 adds x0, x0, #1
37 adds x0, x0, #1
38 ldr w0, =0x10003
39 // CHECK: ldr w0, .Ltmp[[TMP2:[0-9]+]]
4040 adds x0, x0, #1
4141 adds x0, x0, #1
4242
4444 .section d,"ax",@progbits
4545 // CHECK-LABEL: f5:
4646 f5:
47 ldr x0, =0x10004
48 // CHECK: ldr x0, .Ltmp[[TMP3:[0-9]+]]
49 adds x0, x0, #1
50 adds x0, x0, #1
51 adds x0, x0, #1
52 adds x0, x0, #1
53 adds x0, x0, #1
54 adds x0, x0, #1
55 adds x0, x0, #1
56 ldr x0, =0x10004
57 // CHECK: ldr x0, .Ltmp[[TMP4:[0-9]+]]
47 ldr w0, =0x10004
48 // CHECK: ldr w0, .Ltmp[[TMP3:[0-9]+]]
49 adds x0, x0, #1
50 adds x0, x0, #1
51 adds x0, x0, #1
52 adds x0, x0, #1
53 adds x0, x0, #1
54 adds x0, x0, #1
55 adds x0, x0, #1
56 ldr w0, =0x10004
57 // CHECK: ldr w0, .Ltmp[[TMP4:[0-9]+]]
5858 adds x0, x0, #1
5959 adds x0, x0, #1
6060 adds x0, x0, #1
6666 .section e,"ax",@progbits
6767 // CHECK-LABEL: f6:
6868 f6:
69 ldr x0, =0x10006
70 // CHECK: ldr x0, .Ltmp[[TMP5:[0-9]+]]
69 ldr w0, =0x10006
70 // CHECK: ldr w0, .Ltmp[[TMP5:[0-9]+]]
7171 adds x0, x0, #1
7272 adds x0, x0, #1
7373 adds x0, x0, #1
8383 // CHECK-LABEL: f8:
8484 f8:
8585 adds x0, x0, #1
86 ldr x0, =0x10007
87 // CHECK: ldr x0, .Ltmp[[TMP6:[0-9]+]]
86 ldr w0, =0x10007
87 // CHECK: ldr w0, .Ltmp[[TMP6:[0-9]+]]
8888 adds x0, x0, #1
8989 adds x0, x0, #1
9090
9696 .section g,"ax",@progbits
9797 // CHECK-LABEL: f9:
9898 f9:
99 ldr x0, =foo
100 // CHECK: ldr x0, .Ltmp[[TMP7:[0-9]+]]
99 ldr w0, =foo
100 // CHECK: ldr w0, .Ltmp[[TMP7:[0-9]+]]
101101
102102 // load a symbol from another section
103103 .section h,"ax",@progbits
104104 // CHECK-LABEL: f10:
105105 f10:
106 ldr x0, =f5
107 // CHECK: ldr x0, .Ltmp[[TMP8:[0-9]+]]
106 ldr w0, =f5
107 // CHECK: ldr w0, .Ltmp[[TMP8:[0-9]+]]
108108
109109 // load a symbol from the same section
110110 .section i,"ax",@progbits
111111 // CHECK-LABEL: f11:
112112 f11:
113 ldr x0, =f12
114 // CHECK: ldr x0, .Ltmp[[TMP9:[0-9]+]]
113 ldr w0, =f12
114 // CHECK: ldr w0, .Ltmp[[TMP9:[0-9]+]]
115115 ldr w0,=0x3C000
116116 // CHECK: ldr w0, .Ltmp[[TMP10:[0-9]+]]
117117
126126 f13:
127127 adds x0, x0, #1
128128 adds x0, x0, #1
129 ldr x0, =0x101
130 // CHECK: movz x0, #0x101
131 adds x0, x0, #1
132 adds x0, x0, #1
133 ldr x0, =bar
134 // CHECK: ldr x0, .Ltmp[[TMP11:[0-9]+]]
129 ldr w0, =0x101
130 // CHECK: movz w0, #0x101
131 adds x0, x0, #1
132 adds x0, x0, #1
133 ldr w0, =bar
134 // CHECK: ldr w0, .Ltmp[[TMP11:[0-9]+]]
135135 adds x0, x0, #1
136136 adds x0, x0, #1
137137 //
140140
141141 // usage in macro
142142 .macro useit_in_a_macro
143 ldr x0, =0x10008
144 ldr x0, =baz
143 ldr w0, =0x10008
144 ldr w0, =baz
145145 .endm
146146 .section k,"ax",@progbits
147147 // CHECK-LABEL: f14:
148148 f14:
149149 useit_in_a_macro
150 // CHECK: ldr x0, .Ltmp[[TMP12:[0-9]+]]
151 // CHECK: ldr x0, .Ltmp[[TMP13:[0-9]+]]
150 // CHECK: ldr w0, .Ltmp[[TMP12:[0-9]+]]
151 // CHECK: ldr w0, .Ltmp[[TMP13:[0-9]+]]
152152
153153 // usage with expressions
154154 .section l, "ax", @progbits
155155 // CHECK-LABEL: f15:
156156 f15:
157 ldr x0, =0x10001+8
158 // CHECK: ldr x0, .Ltmp[[TMP14:[0-9]+]]
159 adds x0, x0, #1
160 ldr x0, =bar+4
161 // CHECK: ldr x0, .Ltmp[[TMP15:[0-9]+]]
162 adds x0, x0, #1
157 ldr w0, =0x10001+8
158 // CHECK: ldr w0, .Ltmp[[TMP14:[0-9]+]]
159 adds x0, x0, #1
160 ldr w0, =bar+4
161 // CHECK: ldr w0, .Ltmp[[TMP15:[0-9]+]]
162 adds x0, x0, #1
163
164 // usage with 64-bit regs
165 .section m, "ax", @progbits
166 // CHECK-LABEL: f16:
167 f16:
168 ldr x0, =0x0102030405060708
169 // CHECK: ldr x0, .Ltmp[[TMP16:[0-9]+]]
170 add x0, x0, #1
171 ldr w0, =bar
172 // CHECK: ldr w0, .Ltmp[[TMP17:[0-9]+]]
173 ldr x0, =bar+16
174 // CHECK: ldr x0, .Ltmp[[TMP18:[0-9]+]]
175 add x0, x0, #1
176 ldr x0, =0x100000001
177 // CHECK: ldr x0, .Ltmp[[TMP19:[0-9]+]]
178 ldr x1, =-0x80000001
179 // CHECK: ldr x1, .Ltmp[[TMP20:[0-9]+]]
180 ldr x2, =0x10001
181 // CHECK: ldr x2, .Ltmp[[TMP21:[0-9]+]]
182
183 // check range for 32-bit regs
184 .section n, "ax", @progbits
185 // CHECK-LABEL: f17:
186 f17:
187 ldr w0, =0xFFFFFFFF
188 // CHECK: ldr w0, .Ltmp[[TMP22:[0-9]+]]
189 add w0, w0, #1
190 ldr w1, =-0x7FFFFFFF
191 // CHECK: ldr w1, .Ltmp[[TMP23:[0-9]+]]
192 add w0, w0, #1
193 ldr w0, =-1
194 // CHECK: ldr w0, .Ltmp[[TMP24:[0-9]+]]
195 add w0, w0, #1
196
197 // make sure the same contant uses different pools for 32- and 64-bit registers
198 .section o, "ax", @progbits
199 // CHECK-LABEL: f18:
200 f18:
201 ldr w0, =0x320064
202 // CHECK: ldr w0, .Ltmp[[TMP25:[0-9]+]]
203 add w0, w0, #1
204 ldr x1, =0x320064
205 // CHECK: ldr x1, .Ltmp[[TMP26:[0-9]+]]
163206
164207 //
165208 // Constant Pools
173216 // CHECK: .align 2
174217 // CHECK: .Ltmp[[TMP1]]
175218 // CHECK: .word 65538
219 // CHECK: .align 2
176220 // CHECK: .Ltmp[[TMP2]]
177221 // CHECK: .word 65539
178222
180224 // CHECK: .align 2
181225 // CHECK: .Ltmp[[TMP3]]
182226 // CHECK: .word 65540
227 // CHECK: .align 2
183228 // CHECK: .Ltmp[[TMP4]]
184229 // CHECK: .word 65540
185230
187232 // CHECK: .align 2
188233 // CHECK: .Ltmp[[TMP5]]
189234 // CHECK: .word 65542
235 // CHECK: .align 2
190236 // CHECK: .Ltmp[[TMP6]]
191237 // CHECK: .word 65543
192238
207253 // CHECK: .align 2
208254 // CHECK: .Ltmp[[TMP9]]
209255 // CHECK: .word f12
256 // CHECK: .align 2
210257 // CHECK: .Ltmp[[TMP10]]
211258 // CHECK: .word 245760
212259
219266 // CHECK: .align 2
220267 // CHECK: .Ltmp[[TMP12]]
221268 // CHECK: .word 65544
269 // CHECK: .align 2
222270 // CHECK: .Ltmp[[TMP13]]
223271 // CHECK: .word baz
224272
226274 // CHECK: .align 2
227275 // CHECK: .Ltmp[[TMP14]]
228276 // CHECK: .word 65545
277 // CHECK: .align 2
229278 // CHECK: .Ltmp[[TMP15]]
230279 // CHECK: .word bar+4
280
281 // CHECK: .section m,"ax",@progbits
282 // CHECK: .align 3
283 // CHECK: .Ltmp[[TMP16]]
284 // CHECK: .xword 72623859790382856
285 // CHECK: .align 2
286 // CHECK: .Ltmp[[TMP17]]
287 // CHECK: .word bar
288 // CHECK: .align 3
289 // CHECK: .Ltmp[[TMP18]]
290 // CHECK: .xword bar+16
291 // CHECK: .align 3
292 // CHECK: .Ltmp[[TMP19]]
293 // CHECK: .xword 4294967297
294 // CHECK: .align 3
295 // CHECK: .Ltmp[[TMP20]]
296 // CHECK: .xword -2147483649
297 // CHECK: .align 3
298 // CHECK: .Ltmp[[TMP21]]
299 // CHECK: .xword 65537
300
301 // CHECK: .section n,"ax",@progbits
302 // CHECK: .align 2
303 // CHECK: .Ltmp[[TMP22]]
304 // CHECK: .word 4294967295
305 // CHECK: .align 2
306 // CHECK: .Ltmp[[TMP23]]
307 // CHECK: .word -2147483647
308 // CHECK: .align 2
309 // CHECK: .Ltmp[[TMP24]]
310 // CHECK: .word -1
311
312 // CHECK: .section o,"ax",@progbits
313 // CHECK: .align 2
314 // CHECK: .Ltmp[[TMP25]]
315 // CHECK: .word 3276900
316 // CHECK: .align 3
317 // CHECK: .Ltmp[[TMP26]]
318 // CHECK: .xword 3276900
155155 @ Constant Pools
156156 @
157157 @ CHECK: .section __TEXT,b,regular,pure_instructions
158 @ CHECK: .align 2
159 @ CHECK: .data_region
158 @ CHECK: .data_region
159 @ CHECK: .align 2
160160 @ CHECK-LABEL: Ltmp0:
161161 @ CHECK: .long 65537
162162 @ CHECK: .end_data_region
163163
164164 @ CHECK: .section __TEXT,c,regular,pure_instructions
165 @ CHECK: .align 2
166 @ CHECK: .data_region
165 @ CHECK: .data_region
166 @ CHECK: .align 2
167167 @ CHECK-LABEL: Ltmp1:
168168 @ CHECK: .long 65538
169 @ CHECK: .align 2
169170 @ CHECK-LABEL: Ltmp2:
170171 @ CHECK: .long 65539
171172 @ CHECK: .end_data_region
172173
173174 @ CHECK: .section __TEXT,d,regular,pure_instructions
174 @ CHECK: .align 2
175 @ CHECK: .data_region
175 @ CHECK: .data_region
176 @ CHECK: .align 2
176177 @ CHECK-LABEL: Ltmp3:
177178 @ CHECK: .long 65540
179 @ CHECK: .align 2
178180 @ CHECK-LABEL: Ltmp4:
179181 @ CHECK: .long 65540
180182 @ CHECK: .end_data_region
181183
182184 @ CHECK: .section __TEXT,e,regular,pure_instructions
183 @ CHECK: .align 2
184 @ CHECK: .data_region
185 @ CHECK: .data_region
186 @ CHECK: .align 2
185187 @ CHECK-LABEL: Ltmp5:
186188 @ CHECK: .long 65542
189 @ CHECK: .align 2
187190 @ CHECK-LABEL: Ltmp6:
188191 @ CHECK: .long 65543
189192 @ CHECK: .end_data_region
192195 @ CHECK-NOT: .section __TEXT,f,regular,pure_instructions
193196
194197 @ CHECK: .section __TEXT,g,regular,pure_instructions
195 @ CHECK: .align 2
196 @ CHECK: .data_region
198 @ CHECK: .data_region
199 @ CHECK: .align 2
197200 @ CHECK-LABEL: Ltmp7:
198201 @ CHECK: .long foo
199202 @ CHECK: .end_data_region
200203
201204 @ CHECK: .section __TEXT,h,regular,pure_instructions
202 @ CHECK: .align 2
203 @ CHECK: .data_region
205 @ CHECK: .data_region
206 @ CHECK: .align 2
204207 @ CHECK-LABEL: Ltmp8:
205208 @ CHECK: .long f5
206209 @ CHECK: .end_data_region
207210
208211 @ CHECK: .section __TEXT,i,regular,pure_instructions
209 @ CHECK: .align 2
210 @ CHECK: .data_region
212 @ CHECK: .data_region
213 @ CHECK: .align 2
211214 @ CHECK-LABEL: Ltmp9:
212215 @ CHECK: .long f12
213216 @ CHECK: .end_data_region
214217
215218 @ CHECK: .section __TEXT,j,regular,pure_instructions
216 @ CHECK: .align 2
217 @ CHECK: .data_region
219 @ CHECK: .data_region
220 @ CHECK: .align 2
218221 @ CHECK-LABEL: Ltmp10:
219222 @ CHECK: .long 257
223 @ CHECK: .align 2
220224 @ CHECK-LABEL: Ltmp11:
221225 @ CHECK: .long bar
222226 @ CHECK: .end_data_region
223227
224228 @ CHECK: .section __TEXT,k,regular,pure_instructions
225 @ CHECK: .align 2
226 @ CHECK: .data_region
229 @ CHECK: .data_region
230 @ CHECK: .align 2
227231 @ CHECK-LABEL: Ltmp12:
228232 @ CHECK: .long 65544
233 @ CHECK: .align 2
229234 @ CHECK-LABEL: Ltmp13:
230235 @ CHECK: .long baz
231236 @ CHECK: .end_data_region
232237
233238 @ CHECK: .section __TEXT,l,regular,pure_instructions
234 @ CHECK: .align 2
235 @ CHECK: .data_region
239 @ CHECK: .data_region
240 @ CHECK: .align 2
236241 @ CHECK-LABEL: Ltmp14:
237242 @ CHECK: .long 65545
243 @ CHECK: .align 2
238244 @ CHECK-LABEL: Ltmp15:
239245 @ CHECK: .long bar+4
240246 @ CHECK: .end_data_region
1818 b f3
1919 .ltorg
2020 @ constant pool
21 @ CHECK: .data_region
2122 @ CHECK: .align 2
22 @ CHECK: .data_region
2323 @ CHECK-LABEL: Ltmp0:
2424 @ CHECK: .long 65537
2525 @ CHECK: .end_data_region
4040 b f5
4141 .ltorg
4242 @ constant pool
43 @ CHECK: .data_region
4344 @ CHECK: .align 2
44 @ CHECK: .data_region
4545 @ CHECK-LABEL: Ltmp1:
4646 @ CHECK: .long 65538
4747 @ CHECK: .end_data_region
5656 b f6
5757 .ltorg
5858 @ constant pool
59 @ CHECK: .data_region
5960 @ CHECK: .align 2
60 @ CHECK: .data_region
6161 @ CHECK-LABEL: Ltmp2:
6262 @ CHECK: .long 65539
6363 @ CHECK: .end_data_region
9191 b f10
9292 .ltorg
9393 @ constant pool
94 @ CHECK: .data_region
9495 @ CHECK: .align 2
95 @ CHECK: .data_region
9696 @ CHECK-LABEL: Ltmp3:
9797 @ CHECK: .long bar
9898 @ CHECK: .end_data_region
113113 b f12
114114 .ltorg
115115 @ constant pool
116 @ CHECK: .data_region
116117 @ CHECK: .align 2
117 @ CHECK: .data_region
118118 @ CHECK-LABEL: Ltmp4:
119119 @ CHECK: .long 65540
120120 @ CHECK: .end_data_region
140140 @ should have a non-empty constant pool at end of this section
141141 @ CHECK: .section __TEXT,e,regular,pure_instructions
142142 @ constant pool
143 @ CHECK: .data_region
143144 @ CHECK: .align 2
144 @ CHECK: .data_region
145145 @ CHECK-LABEL: Ltmp5:
146146 @ CHECK: .long 65541
147147 @ CHECK: .end_data_region