Coverage Report

Created: 2019-02-15 18:59

/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
817k
                            const MachineInstr *MI) {
12
817k
  switch (MI->getOpcode()) {
13
817k
    
default: return false794k
;
14
817k
    case ARM::B: {
15
231
      MCInst TmpInst;
16
231
      MCOperand MCOp;
17
231
      TmpInst.setOpcode(ARM::Bcc);
18
231
      // Operand: target
19
231
      lowerOperand(MI->getOperand(0), MCOp);
20
231
      TmpInst.addOperand(MCOp);
21
231
      // Operand: p
22
231
      TmpInst.addOperand(MCOperand::createImm(14));
23
231
      TmpInst.addOperand(MCOperand::createReg(0));
24
231
      EmitToStreamer(OutStreamer, TmpInst);
25
231
      break;
26
817k
    }
27
817k
    case ARM::LDMIA_RET: {
28
1.41k
      MCInst TmpInst;
29
1.41k
      MCOperand MCOp;
30
1.41k
      TmpInst.setOpcode(ARM::LDMIA_UPD);
31
1.41k
      // Operand: wb
32
1.41k
      lowerOperand(MI->getOperand(0), MCOp);
33
1.41k
      TmpInst.addOperand(MCOp);
34
1.41k
      // Operand: Rn
35
1.41k
      lowerOperand(MI->getOperand(1), MCOp);
36
1.41k
      TmpInst.addOperand(MCOp);
37
1.41k
      // Operand: p
38
1.41k
      lowerOperand(MI->getOperand(2), MCOp);
39
1.41k
      TmpInst.addOperand(MCOp);
40
1.41k
      lowerOperand(MI->getOperand(3), MCOp);
41
1.41k
      TmpInst.addOperand(MCOp);
42
1.41k
      // Operand: regs
43
1.41k
      lowerOperand(MI->getOperand(4), MCOp);
44
1.41k
      TmpInst.addOperand(MCOp);
45
1.41k
      // variable_ops
46
5.43k
      for (unsigned i = 5, e = MI->getNumOperands(); i != e; 
++i4.01k
)
47
4.01k
        if (lowerOperand(MI->getOperand(i), MCOp))
48
2.67k
          TmpInst.addOperand(MCOp);
49
1.41k
      EmitToStreamer(OutStreamer, TmpInst);
50
1.41k
      break;
51
817k
    }
52
817k
    case ARM::MLAv5: {
53
29
      MCInst TmpInst;
54
29
      MCOperand MCOp;
55
29
      TmpInst.setOpcode(ARM::MLA);
56
29
      // Operand: Rd
57
29
      lowerOperand(MI->getOperand(0), MCOp);
58
29
      TmpInst.addOperand(MCOp);
59
29
      // Operand: Rn
60
29
      lowerOperand(MI->getOperand(1), MCOp);
61
29
      TmpInst.addOperand(MCOp);
62
29
      // Operand: Rm
63
29
      lowerOperand(MI->getOperand(2), MCOp);
64
29
      TmpInst.addOperand(MCOp);
65
29
      // Operand: Ra
66
29
      lowerOperand(MI->getOperand(3), MCOp);
67
29
      TmpInst.addOperand(MCOp);
68
29
      // Operand: p
69
29
      lowerOperand(MI->getOperand(4), MCOp);
70
29
      TmpInst.addOperand(MCOp);
71
29
      lowerOperand(MI->getOperand(5), MCOp);
72
29
      TmpInst.addOperand(MCOp);
73
29
      // Operand: s
74
29
      lowerOperand(MI->getOperand(6), MCOp);
75
29
      TmpInst.addOperand(MCOp);
76
29
      EmitToStreamer(OutStreamer, TmpInst);
77
29
      break;
78
817k
    }
79
817k
    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
817k
    }
96
817k
    case ARM::MULv5: {
97
40
      MCInst TmpInst;
98
40
      MCOperand MCOp;
99
40
      TmpInst.setOpcode(ARM::MUL);
100
40
      // Operand: Rd
101
40
      lowerOperand(MI->getOperand(0), MCOp);
102
40
      TmpInst.addOperand(MCOp);
103
40
      // Operand: Rn
104
40
      lowerOperand(MI->getOperand(1), MCOp);
105
40
      TmpInst.addOperand(MCOp);
106
40
      // Operand: Rm
107
40
      lowerOperand(MI->getOperand(2), MCOp);
108
40
      TmpInst.addOperand(MCOp);
109
40
      // Operand: p
110
40
      lowerOperand(MI->getOperand(3), MCOp);
111
40
      TmpInst.addOperand(MCOp);
112
40
      lowerOperand(MI->getOperand(4), MCOp);
113
40
      TmpInst.addOperand(MCOp);
114
40
      // Operand: s
115
40
      lowerOperand(MI->getOperand(5), MCOp);
116
40
      TmpInst.addOperand(MCOp);
117
40
      EmitToStreamer(OutStreamer, TmpInst);
118
40
      break;
119
817k
    }
120
817k
    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
817k
    }
153
817k
    case ARM::SMULLv5: {
154
32
      MCInst TmpInst;
155
32
      MCOperand MCOp;
156
32
      TmpInst.setOpcode(ARM::SMULL);
157
32
      // Operand: RdLo
158
32
      lowerOperand(MI->getOperand(0), MCOp);
159
32
      TmpInst.addOperand(MCOp);
160
32
      // Operand: RdHi
161
32
      lowerOperand(MI->getOperand(1), MCOp);
162
32
      TmpInst.addOperand(MCOp);
163
32
      // Operand: Rn
164
32
      lowerOperand(MI->getOperand(2), MCOp);
165
32
      TmpInst.addOperand(MCOp);
166
32
      // Operand: Rm
167
32
      lowerOperand(MI->getOperand(3), MCOp);
168
32
      TmpInst.addOperand(MCOp);
169
32
      // Operand: p
170
32
      lowerOperand(MI->getOperand(4), MCOp);
171
32
      TmpInst.addOperand(MCOp);
172
32
      lowerOperand(MI->getOperand(5), MCOp);
173
32
      TmpInst.addOperand(MCOp);
174
32
      // Operand: s
175
32
      lowerOperand(MI->getOperand(6), MCOp);
176
32
      TmpInst.addOperand(MCOp);
177
32
      EmitToStreamer(OutStreamer, TmpInst);
178
32
      break;
179
817k
    }
180
817k
    case ARM::TAILJMPd: {
181
199
      MCInst TmpInst;
182
199
      MCOperand MCOp;
183
199
      TmpInst.setOpcode(ARM::Bcc);
184
199
      // Operand: target
185
199
      lowerOperand(MI->getOperand(0), MCOp);
186
199
      TmpInst.addOperand(MCOp);
187
199
      // Operand: p
188
199
      TmpInst.addOperand(MCOperand::createImm(14));
189
199
      TmpInst.addOperand(MCOperand::createReg(0));
190
199
      EmitToStreamer(OutStreamer, TmpInst);
191
199
      break;
192
817k
    }
193
817k
    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
817k
    }
203
817k
    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
817k
    }
220
817k
    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
817k
    }
253
817k
    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
817k
    }
280
817k
    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
817k
    }
295
817k
    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
817k
    }
310
817k
    case ARM::t2LDMIA_RET: {
311
293
      MCInst TmpInst;
312
293
      MCOperand MCOp;
313
293
      TmpInst.setOpcode(ARM::t2LDMIA_UPD);
314
293
      // Operand: wb
315
293
      lowerOperand(MI->getOperand(0), MCOp);
316
293
      TmpInst.addOperand(MCOp);
317
293
      // Operand: Rn
318
293
      lowerOperand(MI->getOperand(1), MCOp);
319
293
      TmpInst.addOperand(MCOp);
320
293
      // Operand: p
321
293
      lowerOperand(MI->getOperand(2), MCOp);
322
293
      TmpInst.addOperand(MCOp);
323
293
      lowerOperand(MI->getOperand(3), MCOp);
324
293
      TmpInst.addOperand(MCOp);
325
293
      // Operand: regs
326
293
      lowerOperand(MI->getOperand(4), MCOp);
327
293
      TmpInst.addOperand(MCOp);
328
293
      // variable_ops
329
2.16k
      for (unsigned i = 5, e = MI->getNumOperands(); i != e; 
++i1.86k
)
330
1.86k
        if (lowerOperand(MI->getOperand(i), MCOp))
331
1.57k
          TmpInst.addOperand(MCOp);
332
293
      EmitToStreamer(OutStreamer, TmpInst);
333
293
      break;
334
817k
    }
335
817k
    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
817k
    }
352
817k
    case ARM::tBX_RET: {
353
8.13k
      MCInst TmpInst;
354
8.13k
      MCOperand MCOp;
355
8.13k
      TmpInst.setOpcode(ARM::tBX);
356
8.13k
      // Operand: Rm
357
8.13k
      TmpInst.addOperand(MCOperand::createReg(ARM::LR));
358
8.13k
      // Operand: p
359
8.13k
      lowerOperand(MI->getOperand(0), MCOp);
360
8.13k
      TmpInst.addOperand(MCOp);
361
8.13k
      lowerOperand(MI->getOperand(1), MCOp);
362
8.13k
      TmpInst.addOperand(MCOp);
363
8.13k
      EmitToStreamer(OutStreamer, TmpInst);
364
8.13k
      break;
365
817k
    }
366
817k
    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
817k
    }
381
817k
    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
817k
    }
396
817k
    case ARM::tLDMIA_UPD: {
397
44
      MCInst TmpInst;
398
44
      MCOperand MCOp;
399
44
      TmpInst.setOpcode(ARM::tLDMIA);
400
44
      // Operand: Rn
401
44
      lowerOperand(MI->getOperand(1), MCOp);
402
44
      TmpInst.addOperand(MCOp);
403
44
      // Operand: p
404
44
      lowerOperand(MI->getOperand(2), MCOp);
405
44
      TmpInst.addOperand(MCOp);
406
44
      lowerOperand(MI->getOperand(3), MCOp);
407
44
      TmpInst.addOperand(MCOp);
408
44
      // Operand: regs
409
44
      lowerOperand(MI->getOperand(4), MCOp);
410
44
      TmpInst.addOperand(MCOp);
411
44
      // variable_ops
412
128
      for (unsigned i = 5, e = MI->getNumOperands(); i != e; 
++i84
)
413
84
        if (lowerOperand(MI->getOperand(i), MCOp))
414
84
          TmpInst.addOperand(MCOp);
415
44
      EmitToStreamer(OutStreamer, TmpInst);
416
44
      break;
417
817k
    }
418
817k
    case ARM::tPOP_RET: {
419
9.88k
      MCInst TmpInst;
420
9.88k
      MCOperand MCOp;
421
9.88k
      TmpInst.setOpcode(ARM::tPOP);
422
9.88k
      // Operand: p
423
9.88k
      lowerOperand(MI->getOperand(0), MCOp);
424
9.88k
      TmpInst.addOperand(MCOp);
425
9.88k
      lowerOperand(MI->getOperand(1), MCOp);
426
9.88k
      TmpInst.addOperand(MCOp);
427
9.88k
      // Operand: regs
428
9.88k
      lowerOperand(MI->getOperand(2), MCOp);
429
9.88k
      TmpInst.addOperand(MCOp);
430
9.88k
      // variable_ops
431
49.6k
      for (unsigned i = 3, e = MI->getNumOperands(); i != e; 
++i39.8k
)
432
39.8k
        if (lowerOperand(MI->getOperand(i), MCOp))
433
29.8k
          TmpInst.addOperand(MCOp);
434
9.88k
      EmitToStreamer(OutStreamer, TmpInst);
435
9.88k
      break;
436
817k
    }
437
817k
    case ARM::tTAILJMPd: {
438
2.37k
      MCInst TmpInst;
439
2.37k
      MCOperand MCOp;
440
2.37k
      TmpInst.setOpcode(ARM::t2B);
441
2.37k
      // Operand: target
442
2.37k
      lowerOperand(MI->getOperand(0), MCOp);
443
2.37k
      TmpInst.addOperand(MCOp);
444
2.37k
      // Operand: p
445
2.37k
      lowerOperand(MI->getOperand(1), MCOp);
446
2.37k
      TmpInst.addOperand(MCOp);
447
2.37k
      lowerOperand(MI->getOperand(2), MCOp);
448
2.37k
      TmpInst.addOperand(MCOp);
449
2.37k
      EmitToStreamer(OutStreamer, TmpInst);
450
2.37k
      break;
451
817k
    }
452
817k
    case ARM::tTAILJMPdND: {
453
332
      MCInst TmpInst;
454
332
      MCOperand MCOp;
455
332
      TmpInst.setOpcode(ARM::tB);
456
332
      // Operand: target
457
332
      lowerOperand(MI->getOperand(0), MCOp);
458
332
      TmpInst.addOperand(MCOp);
459
332
      // Operand: p
460
332
      lowerOperand(MI->getOperand(1), MCOp);
461
332
      TmpInst.addOperand(MCOp);
462
332
      lowerOperand(MI->getOperand(2), MCOp);
463
332
      TmpInst.addOperand(MCOp);
464
332
      EmitToStreamer(OutStreamer, TmpInst);
465
332
      break;
466
817k
    }
467
817k
    case ARM::tTAILJMPr: {
468
110
      MCInst TmpInst;
469
110
      MCOperand MCOp;
470
110
      TmpInst.setOpcode(ARM::tBX);
471
110
      // Operand: Rm
472
110
      lowerOperand(MI->getOperand(0), MCOp);
473
110
      TmpInst.addOperand(MCOp);
474
110
      // Operand: p
475
110
      TmpInst.addOperand(MCOperand::createImm(14));
476
110
      TmpInst.addOperand(MCOperand::createReg(0));
477
110
      EmitToStreamer(OutStreamer, TmpInst);
478
110
      break;
479
23.2k
    }
480
23.2k
  }
481
23.2k
  return true;
482
23.2k
}
483