Coverage Report

Created: 2018-09-23 22:08

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/clang-build/lib/Target/ARM/ARMGenMCPseudoLowering.inc
Line
Count
Source (jump to first uncovered line)
1
/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
2
|*                                                                            *|
3
|* Pseudo-instruction MC lowering Source Fragment                             *|
4
|*                                                                            *|
5
|* Automatically generated file, do not edit!                                 *|
6
|*                                                                            *|
7
\*===----------------------------------------------------------------------===*/
8
9
bool ARMAsmPrinter::
10
emitPseudoExpansionLowering(MCStreamer &OutStreamer,
11
788k
                            const MachineInstr *MI) {
12
788k
  switch (MI->getOpcode()) {
13
788k
    
default: return false766k
;
14
788k
    case ARM::B: {
15
224
      MCInst TmpInst;
16
224
      MCOperand MCOp;
17
224
      TmpInst.setOpcode(ARM::Bcc);
18
224
      // Operand: target
19
224
      lowerOperand(MI->getOperand(0), MCOp);
20
224
      TmpInst.addOperand(MCOp);
21
224
      // Operand: p
22
224
      TmpInst.addOperand(MCOperand::createImm(14));
23
224
      TmpInst.addOperand(MCOperand::createReg(0));
24
224
      EmitToStreamer(OutStreamer, TmpInst);
25
224
      break;
26
788k
    }
27
788k
    case ARM::LDMIA_RET: {
28
1.40k
      MCInst TmpInst;
29
1.40k
      MCOperand MCOp;
30
1.40k
      TmpInst.setOpcode(ARM::LDMIA_UPD);
31
1.40k
      // Operand: wb
32
1.40k
      lowerOperand(MI->getOperand(0), MCOp);
33
1.40k
      TmpInst.addOperand(MCOp);
34
1.40k
      // Operand: Rn
35
1.40k
      lowerOperand(MI->getOperand(1), MCOp);
36
1.40k
      TmpInst.addOperand(MCOp);
37
1.40k
      // Operand: p
38
1.40k
      lowerOperand(MI->getOperand(2), MCOp);
39
1.40k
      TmpInst.addOperand(MCOp);
40
1.40k
      lowerOperand(MI->getOperand(3), MCOp);
41
1.40k
      TmpInst.addOperand(MCOp);
42
1.40k
      // Operand: regs
43
1.40k
      lowerOperand(MI->getOperand(4), MCOp);
44
1.40k
      TmpInst.addOperand(MCOp);
45
1.40k
      // variable_ops
46
5.40k
      for (unsigned i = 5, e = MI->getNumOperands(); i != e; 
++i3.99k
)
47
3.99k
        if (lowerOperand(MI->getOperand(i), MCOp))
48
2.65k
          TmpInst.addOperand(MCOp);
49
1.40k
      EmitToStreamer(OutStreamer, TmpInst);
50
1.40k
      break;
51
788k
    }
52
788k
    case ARM::MLAv5: {
53
26
      MCInst TmpInst;
54
26
      MCOperand MCOp;
55
26
      TmpInst.setOpcode(ARM::MLA);
56
26
      // Operand: Rd
57
26
      lowerOperand(MI->getOperand(0), MCOp);
58
26
      TmpInst.addOperand(MCOp);
59
26
      // Operand: Rn
60
26
      lowerOperand(MI->getOperand(1), MCOp);
61
26
      TmpInst.addOperand(MCOp);
62
26
      // Operand: Rm
63
26
      lowerOperand(MI->getOperand(2), MCOp);
64
26
      TmpInst.addOperand(MCOp);
65
26
      // Operand: Ra
66
26
      lowerOperand(MI->getOperand(3), MCOp);
67
26
      TmpInst.addOperand(MCOp);
68
26
      // Operand: p
69
26
      lowerOperand(MI->getOperand(4), MCOp);
70
26
      TmpInst.addOperand(MCOp);
71
26
      lowerOperand(MI->getOperand(5), MCOp);
72
26
      TmpInst.addOperand(MCOp);
73
26
      // Operand: s
74
26
      lowerOperand(MI->getOperand(6), MCOp);
75
26
      TmpInst.addOperand(MCOp);
76
26
      EmitToStreamer(OutStreamer, TmpInst);
77
26
      break;
78
788k
    }
79
788k
    case ARM::MOVPCRX: {
80
0
      MCInst TmpInst;
81
0
      MCOperand MCOp;
82
0
      TmpInst.setOpcode(ARM::MOVr);
83
0
      // Operand: Rd
84
0
      TmpInst.addOperand(MCOperand::createReg(ARM::PC));
85
0
      // Operand: Rm
86
0
      lowerOperand(MI->getOperand(0), MCOp);
87
0
      TmpInst.addOperand(MCOp);
88
0
      // Operand: p
89
0
      TmpInst.addOperand(MCOperand::createImm(14));
90
0
      TmpInst.addOperand(MCOperand::createReg(0));
91
0
      // Operand: s
92
0
      TmpInst.addOperand(MCOperand::createReg(0));
93
0
      EmitToStreamer(OutStreamer, TmpInst);
94
0
      break;
95
788k
    }
96
788k
    case ARM::MULv5: {
97
42
      MCInst TmpInst;
98
42
      MCOperand MCOp;
99
42
      TmpInst.setOpcode(ARM::MUL);
100
42
      // Operand: Rd
101
42
      lowerOperand(MI->getOperand(0), MCOp);
102
42
      TmpInst.addOperand(MCOp);
103
42
      // Operand: Rn
104
42
      lowerOperand(MI->getOperand(1), MCOp);
105
42
      TmpInst.addOperand(MCOp);
106
42
      // Operand: Rm
107
42
      lowerOperand(MI->getOperand(2), MCOp);
108
42
      TmpInst.addOperand(MCOp);
109
42
      // Operand: p
110
42
      lowerOperand(MI->getOperand(3), MCOp);
111
42
      TmpInst.addOperand(MCOp);
112
42
      lowerOperand(MI->getOperand(4), MCOp);
113
42
      TmpInst.addOperand(MCOp);
114
42
      // Operand: s
115
42
      lowerOperand(MI->getOperand(5), MCOp);
116
42
      TmpInst.addOperand(MCOp);
117
42
      EmitToStreamer(OutStreamer, TmpInst);
118
42
      break;
119
788k
    }
120
788k
    case ARM::SMLALv5: {
121
9
      MCInst TmpInst;
122
9
      MCOperand MCOp;
123
9
      TmpInst.setOpcode(ARM::SMLAL);
124
9
      // Operand: RdLo
125
9
      lowerOperand(MI->getOperand(0), MCOp);
126
9
      TmpInst.addOperand(MCOp);
127
9
      // Operand: RdHi
128
9
      lowerOperand(MI->getOperand(1), MCOp);
129
9
      TmpInst.addOperand(MCOp);
130
9
      // Operand: Rn
131
9
      lowerOperand(MI->getOperand(2), MCOp);
132
9
      TmpInst.addOperand(MCOp);
133
9
      // Operand: Rm
134
9
      lowerOperand(MI->getOperand(3), MCOp);
135
9
      TmpInst.addOperand(MCOp);
136
9
      // Operand: RLo
137
9
      lowerOperand(MI->getOperand(4), MCOp);
138
9
      TmpInst.addOperand(MCOp);
139
9
      // Operand: RHi
140
9
      lowerOperand(MI->getOperand(5), MCOp);
141
9
      TmpInst.addOperand(MCOp);
142
9
      // Operand: p
143
9
      lowerOperand(MI->getOperand(6), MCOp);
144
9
      TmpInst.addOperand(MCOp);
145
9
      lowerOperand(MI->getOperand(7), MCOp);
146
9
      TmpInst.addOperand(MCOp);
147
9
      // Operand: s
148
9
      lowerOperand(MI->getOperand(8), MCOp);
149
9
      TmpInst.addOperand(MCOp);
150
9
      EmitToStreamer(OutStreamer, TmpInst);
151
9
      break;
152
788k
    }
153
788k
    case ARM::SMULLv5: {
154
30
      MCInst TmpInst;
155
30
      MCOperand MCOp;
156
30
      TmpInst.setOpcode(ARM::SMULL);
157
30
      // Operand: RdLo
158
30
      lowerOperand(MI->getOperand(0), MCOp);
159
30
      TmpInst.addOperand(MCOp);
160
30
      // Operand: RdHi
161
30
      lowerOperand(MI->getOperand(1), MCOp);
162
30
      TmpInst.addOperand(MCOp);
163
30
      // Operand: Rn
164
30
      lowerOperand(MI->getOperand(2), MCOp);
165
30
      TmpInst.addOperand(MCOp);
166
30
      // Operand: Rm
167
30
      lowerOperand(MI->getOperand(3), MCOp);
168
30
      TmpInst.addOperand(MCOp);
169
30
      // Operand: p
170
30
      lowerOperand(MI->getOperand(4), MCOp);
171
30
      TmpInst.addOperand(MCOp);
172
30
      lowerOperand(MI->getOperand(5), MCOp);
173
30
      TmpInst.addOperand(MCOp);
174
30
      // Operand: s
175
30
      lowerOperand(MI->getOperand(6), MCOp);
176
30
      TmpInst.addOperand(MCOp);
177
30
      EmitToStreamer(OutStreamer, TmpInst);
178
30
      break;
179
788k
    }
180
788k
    case ARM::TAILJMPd: {
181
191
      MCInst TmpInst;
182
191
      MCOperand MCOp;
183
191
      TmpInst.setOpcode(ARM::Bcc);
184
191
      // Operand: target
185
191
      lowerOperand(MI->getOperand(0), MCOp);
186
191
      TmpInst.addOperand(MCOp);
187
191
      // Operand: p
188
191
      TmpInst.addOperand(MCOperand::createImm(14));
189
191
      TmpInst.addOperand(MCOperand::createReg(0));
190
191
      EmitToStreamer(OutStreamer, TmpInst);
191
191
      break;
192
788k
    }
193
788k
    case ARM::TAILJMPr: {
194
6
      MCInst TmpInst;
195
6
      MCOperand MCOp;
196
6
      TmpInst.setOpcode(ARM::BX);
197
6
      // Operand: dst
198
6
      lowerOperand(MI->getOperand(0), MCOp);
199
6
      TmpInst.addOperand(MCOp);
200
6
      EmitToStreamer(OutStreamer, TmpInst);
201
6
      break;
202
788k
    }
203
788k
    case ARM::TAILJMPr4: {
204
3
      MCInst TmpInst;
205
3
      MCOperand MCOp;
206
3
      TmpInst.setOpcode(ARM::MOVr);
207
3
      // Operand: Rd
208
3
      TmpInst.addOperand(MCOperand::createReg(ARM::PC));
209
3
      // Operand: Rm
210
3
      lowerOperand(MI->getOperand(0), MCOp);
211
3
      TmpInst.addOperand(MCOp);
212
3
      // Operand: p
213
3
      TmpInst.addOperand(MCOperand::createImm(14));
214
3
      TmpInst.addOperand(MCOperand::createReg(0));
215
3
      // Operand: s
216
3
      TmpInst.addOperand(MCOperand::createReg(0));
217
3
      EmitToStreamer(OutStreamer, TmpInst);
218
3
      break;
219
788k
    }
220
788k
    case ARM::UMLALv5: {
221
12
      MCInst TmpInst;
222
12
      MCOperand MCOp;
223
12
      TmpInst.setOpcode(ARM::UMLAL);
224
12
      // Operand: RdLo
225
12
      lowerOperand(MI->getOperand(0), MCOp);
226
12
      TmpInst.addOperand(MCOp);
227
12
      // Operand: RdHi
228
12
      lowerOperand(MI->getOperand(1), MCOp);
229
12
      TmpInst.addOperand(MCOp);
230
12
      // Operand: Rn
231
12
      lowerOperand(MI->getOperand(2), MCOp);
232
12
      TmpInst.addOperand(MCOp);
233
12
      // Operand: Rm
234
12
      lowerOperand(MI->getOperand(3), MCOp);
235
12
      TmpInst.addOperand(MCOp);
236
12
      // Operand: RLo
237
12
      lowerOperand(MI->getOperand(4), MCOp);
238
12
      TmpInst.addOperand(MCOp);
239
12
      // Operand: RHi
240
12
      lowerOperand(MI->getOperand(5), MCOp);
241
12
      TmpInst.addOperand(MCOp);
242
12
      // Operand: p
243
12
      lowerOperand(MI->getOperand(6), MCOp);
244
12
      TmpInst.addOperand(MCOp);
245
12
      lowerOperand(MI->getOperand(7), MCOp);
246
12
      TmpInst.addOperand(MCOp);
247
12
      // Operand: s
248
12
      lowerOperand(MI->getOperand(8), MCOp);
249
12
      TmpInst.addOperand(MCOp);
250
12
      EmitToStreamer(OutStreamer, TmpInst);
251
12
      break;
252
788k
    }
253
788k
    case ARM::UMULLv5: {
254
22
      MCInst TmpInst;
255
22
      MCOperand MCOp;
256
22
      TmpInst.setOpcode(ARM::UMULL);
257
22
      // Operand: RdLo
258
22
      lowerOperand(MI->getOperand(0), MCOp);
259
22
      TmpInst.addOperand(MCOp);
260
22
      // Operand: RdHi
261
22
      lowerOperand(MI->getOperand(1), MCOp);
262
22
      TmpInst.addOperand(MCOp);
263
22
      // Operand: Rn
264
22
      lowerOperand(MI->getOperand(2), MCOp);
265
22
      TmpInst.addOperand(MCOp);
266
22
      // Operand: Rm
267
22
      lowerOperand(MI->getOperand(3), MCOp);
268
22
      TmpInst.addOperand(MCOp);
269
22
      // Operand: p
270
22
      lowerOperand(MI->getOperand(4), MCOp);
271
22
      TmpInst.addOperand(MCOp);
272
22
      lowerOperand(MI->getOperand(5), MCOp);
273
22
      TmpInst.addOperand(MCOp);
274
22
      // Operand: s
275
22
      lowerOperand(MI->getOperand(6), MCOp);
276
22
      TmpInst.addOperand(MCOp);
277
22
      EmitToStreamer(OutStreamer, TmpInst);
278
22
      break;
279
788k
    }
280
788k
    case ARM::VMOVD0: {
281
2
      MCInst TmpInst;
282
2
      MCOperand MCOp;
283
2
      TmpInst.setOpcode(ARM::VMOVv2i32);
284
2
      // Operand: Vd
285
2
      lowerOperand(MI->getOperand(0), MCOp);
286
2
      TmpInst.addOperand(MCOp);
287
2
      // Operand: SIMM
288
2
      TmpInst.addOperand(MCOperand::createImm(0));
289
2
      // Operand: p
290
2
      TmpInst.addOperand(MCOperand::createImm(14));
291
2
      TmpInst.addOperand(MCOperand::createReg(0));
292
2
      EmitToStreamer(OutStreamer, TmpInst);
293
2
      break;
294
788k
    }
295
788k
    case ARM::VMOVQ0: {
296
2
      MCInst TmpInst;
297
2
      MCOperand MCOp;
298
2
      TmpInst.setOpcode(ARM::VMOVv4i32);
299
2
      // Operand: Vd
300
2
      lowerOperand(MI->getOperand(0), MCOp);
301
2
      TmpInst.addOperand(MCOp);
302
2
      // Operand: SIMM
303
2
      TmpInst.addOperand(MCOperand::createImm(0));
304
2
      // Operand: p
305
2
      TmpInst.addOperand(MCOperand::createImm(14));
306
2
      TmpInst.addOperand(MCOperand::createReg(0));
307
2
      EmitToStreamer(OutStreamer, TmpInst);
308
2
      break;
309
788k
    }
310
788k
    case ARM::t2LDMIA_RET: {
311
216
      MCInst TmpInst;
312
216
      MCOperand MCOp;
313
216
      TmpInst.setOpcode(ARM::t2LDMIA_UPD);
314
216
      // Operand: wb
315
216
      lowerOperand(MI->getOperand(0), MCOp);
316
216
      TmpInst.addOperand(MCOp);
317
216
      // Operand: Rn
318
216
      lowerOperand(MI->getOperand(1), MCOp);
319
216
      TmpInst.addOperand(MCOp);
320
216
      // Operand: p
321
216
      lowerOperand(MI->getOperand(2), MCOp);
322
216
      TmpInst.addOperand(MCOp);
323
216
      lowerOperand(MI->getOperand(3), MCOp);
324
216
      TmpInst.addOperand(MCOp);
325
216
      // Operand: regs
326
216
      lowerOperand(MI->getOperand(4), MCOp);
327
216
      TmpInst.addOperand(MCOp);
328
216
      // variable_ops
329
1.55k
      for (unsigned i = 5, e = MI->getNumOperands(); i != e; 
++i1.33k
)
330
1.33k
        if (lowerOperand(MI->getOperand(i), MCOp))
331
1.07k
          TmpInst.addOperand(MCOp);
332
216
      EmitToStreamer(OutStreamer, TmpInst);
333
216
      break;
334
788k
    }
335
788k
    case ARM::tBRIND: {
336
20
      MCInst TmpInst;
337
20
      MCOperand MCOp;
338
20
      TmpInst.setOpcode(ARM::tMOVr);
339
20
      // Operand: Rd
340
20
      TmpInst.addOperand(MCOperand::createReg(ARM::PC));
341
20
      // Operand: Rm
342
20
      lowerOperand(MI->getOperand(0), MCOp);
343
20
      TmpInst.addOperand(MCOp);
344
20
      // Operand: p
345
20
      lowerOperand(MI->getOperand(1), MCOp);
346
20
      TmpInst.addOperand(MCOp);
347
20
      lowerOperand(MI->getOperand(2), MCOp);
348
20
      TmpInst.addOperand(MCOp);
349
20
      EmitToStreamer(OutStreamer, TmpInst);
350
20
      break;
351
788k
    }
352
788k
    case ARM::tBX_RET: {
353
7.73k
      MCInst TmpInst;
354
7.73k
      MCOperand MCOp;
355
7.73k
      TmpInst.setOpcode(ARM::tBX);
356
7.73k
      // Operand: Rm
357
7.73k
      TmpInst.addOperand(MCOperand::createReg(ARM::LR));
358
7.73k
      // Operand: p
359
7.73k
      lowerOperand(MI->getOperand(0), MCOp);
360
7.73k
      TmpInst.addOperand(MCOp);
361
7.73k
      lowerOperand(MI->getOperand(1), MCOp);
362
7.73k
      TmpInst.addOperand(MCOp);
363
7.73k
      EmitToStreamer(OutStreamer, TmpInst);
364
7.73k
      break;
365
788k
    }
366
788k
    case ARM::tBX_RET_vararg: {
367
0
      MCInst TmpInst;
368
0
      MCOperand MCOp;
369
0
      TmpInst.setOpcode(ARM::tBX);
370
0
      // Operand: Rm
371
0
      lowerOperand(MI->getOperand(0), MCOp);
372
0
      TmpInst.addOperand(MCOp);
373
0
      // Operand: p
374
0
      lowerOperand(MI->getOperand(1), MCOp);
375
0
      TmpInst.addOperand(MCOp);
376
0
      lowerOperand(MI->getOperand(2), MCOp);
377
0
      TmpInst.addOperand(MCOp);
378
0
      EmitToStreamer(OutStreamer, TmpInst);
379
0
      break;
380
788k
    }
381
788k
    case ARM::tBfar: {
382
0
      MCInst TmpInst;
383
0
      MCOperand MCOp;
384
0
      TmpInst.setOpcode(ARM::tBL);
385
0
      // Operand: p
386
0
      lowerOperand(MI->getOperand(1), MCOp);
387
0
      TmpInst.addOperand(MCOp);
388
0
      lowerOperand(MI->getOperand(2), MCOp);
389
0
      TmpInst.addOperand(MCOp);
390
0
      // Operand: func
391
0
      lowerOperand(MI->getOperand(0), MCOp);
392
0
      TmpInst.addOperand(MCOp);
393
0
      EmitToStreamer(OutStreamer, TmpInst);
394
0
      break;
395
788k
    }
396
788k
    case ARM::tLDMIA_UPD: {
397
43
      MCInst TmpInst;
398
43
      MCOperand MCOp;
399
43
      TmpInst.setOpcode(ARM::tLDMIA);
400
43
      // Operand: Rn
401
43
      lowerOperand(MI->getOperand(1), MCOp);
402
43
      TmpInst.addOperand(MCOp);
403
43
      // Operand: p
404
43
      lowerOperand(MI->getOperand(2), MCOp);
405
43
      TmpInst.addOperand(MCOp);
406
43
      lowerOperand(MI->getOperand(3), MCOp);
407
43
      TmpInst.addOperand(MCOp);
408
43
      // Operand: regs
409
43
      lowerOperand(MI->getOperand(4), MCOp);
410
43
      TmpInst.addOperand(MCOp);
411
43
      // variable_ops
412
129
      for (unsigned i = 5, e = MI->getNumOperands(); i != e; 
++i86
)
413
86
        if (lowerOperand(MI->getOperand(i), MCOp))
414
86
          TmpInst.addOperand(MCOp);
415
43
      EmitToStreamer(OutStreamer, TmpInst);
416
43
      break;
417
788k
    }
418
788k
    case ARM::tPOP_RET: {
419
9.61k
      MCInst TmpInst;
420
9.61k
      MCOperand MCOp;
421
9.61k
      TmpInst.setOpcode(ARM::tPOP);
422
9.61k
      // Operand: p
423
9.61k
      lowerOperand(MI->getOperand(0), MCOp);
424
9.61k
      TmpInst.addOperand(MCOp);
425
9.61k
      lowerOperand(MI->getOperand(1), MCOp);
426
9.61k
      TmpInst.addOperand(MCOp);
427
9.61k
      // Operand: regs
428
9.61k
      lowerOperand(MI->getOperand(2), MCOp);
429
9.61k
      TmpInst.addOperand(MCOp);
430
9.61k
      // variable_ops
431
48.3k
      for (unsigned i = 3, e = MI->getNumOperands(); i != e; 
++i38.6k
)
432
38.6k
        if (lowerOperand(MI->getOperand(i), MCOp))
433
29.0k
          TmpInst.addOperand(MCOp);
434
9.61k
      EmitToStreamer(OutStreamer, TmpInst);
435
9.61k
      break;
436
788k
    }
437
788k
    case ARM::tTAILJMPd: {
438
2.25k
      MCInst TmpInst;
439
2.25k
      MCOperand MCOp;
440
2.25k
      TmpInst.setOpcode(ARM::t2B);
441
2.25k
      // Operand: target
442
2.25k
      lowerOperand(MI->getOperand(0), MCOp);
443
2.25k
      TmpInst.addOperand(MCOp);
444
2.25k
      // Operand: p
445
2.25k
      lowerOperand(MI->getOperand(1), MCOp);
446
2.25k
      TmpInst.addOperand(MCOp);
447
2.25k
      lowerOperand(MI->getOperand(2), MCOp);
448
2.25k
      TmpInst.addOperand(MCOp);
449
2.25k
      EmitToStreamer(OutStreamer, TmpInst);
450
2.25k
      break;
451
788k
    }
452
788k
    case ARM::tTAILJMPdND: {
453
299
      MCInst TmpInst;
454
299
      MCOperand MCOp;
455
299
      TmpInst.setOpcode(ARM::tB);
456
299
      // Operand: target
457
299
      lowerOperand(MI->getOperand(0), MCOp);
458
299
      TmpInst.addOperand(MCOp);
459
299
      // Operand: p
460
299
      lowerOperand(MI->getOperand(1), MCOp);
461
299
      TmpInst.addOperand(MCOp);
462
299
      lowerOperand(MI->getOperand(2), MCOp);
463
299
      TmpInst.addOperand(MCOp);
464
299
      EmitToStreamer(OutStreamer, TmpInst);
465
299
      break;
466
788k
    }
467
788k
    case ARM::tTAILJMPr: {
468
104
      MCInst TmpInst;
469
104
      MCOperand MCOp;
470
104
      TmpInst.setOpcode(ARM::tBX);
471
104
      // Operand: Rm
472
104
      lowerOperand(MI->getOperand(0), MCOp);
473
104
      TmpInst.addOperand(MCOp);
474
104
      // Operand: p
475
104
      TmpInst.addOperand(MCOperand::createImm(14));
476
104
      TmpInst.addOperand(MCOperand::createReg(0));
477
104
      EmitToStreamer(OutStreamer, TmpInst);
478
104
      break;
479
22.2k
    }
480
22.2k
  }
481
22.2k
  return true;
482
22.2k
}
483