OLD | NEW |
1 //===- subzero/src/IceTargetLoweringARM32.h - ARM32 lowering ----*- C++ -*-===// | 1 //===- subzero/src/IceTargetLoweringARM32.h - ARM32 lowering ----*- C++ -*-===// |
2 // | 2 // |
3 // The Subzero Code Generator | 3 // The Subzero Code Generator |
4 // | 4 // |
5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
7 // | 7 // |
8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
9 /// | 9 /// |
10 /// \file | 10 /// \file |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 /// all types (integer, floating point, and vectors), as well as moves between | 273 /// all types (integer, floating point, and vectors), as well as moves between |
274 /// Core and VFP registers. This is not a panacea: you must obey the (weird, | 274 /// Core and VFP registers. This is not a panacea: you must obey the (weird, |
275 /// confusing, non-uniform) rules for data moves in ARM. | 275 /// confusing, non-uniform) rules for data moves in ARM. |
276 void _mov(Variable *Dest, Operand *Src0, | 276 void _mov(Variable *Dest, Operand *Src0, |
277 CondARM32::Cond Pred = CondARM32::AL) { | 277 CondARM32::Cond Pred = CondARM32::AL) { |
278 // _mov used to be unique in the sense that it would create a temporary | 278 // _mov used to be unique in the sense that it would create a temporary |
279 // automagically if Dest was nullptr. It won't do that anymore, so we keep | 279 // automagically if Dest was nullptr. It won't do that anymore, so we keep |
280 // an assert around just in case there is some untested code path where Dest | 280 // an assert around just in case there is some untested code path where Dest |
281 // is nullptr. | 281 // is nullptr. |
282 assert(Dest != nullptr); | 282 assert(Dest != nullptr); |
283 Context.insert(InstARM32Mov::create(Func, Dest, Src0, Pred)); | 283 auto *Instr = InstARM32Mov::create(Func, Dest, Src0, Pred); |
| 284 |
| 285 Context.insert(Instr); |
| 286 if (Instr->isMultiDest()) { |
| 287 // If Instr is multi-dest, then Dest must be a Variable64On32. We add a |
| 288 // fake-def for Instr.DestHi here. |
| 289 assert(llvm::isa<Variable64On32>(Dest)); |
| 290 Context.insert(InstFakeDef::create(Func, Instr->getDestHi())); |
| 291 } |
284 } | 292 } |
285 void _mov_redefined(Variable *Dest, Operand *Src0, | 293 void _mov_redefined(Variable *Dest, Operand *Src0, |
286 CondARM32::Cond Pred = CondARM32::AL) { | 294 CondARM32::Cond Pred = CondARM32::AL) { |
287 Inst *NewInst = InstARM32Mov::create(Func, Dest, Src0, Pred); | 295 auto *Instr = InstARM32Mov::create(Func, Dest, Src0, Pred); |
288 NewInst->setDestRedefined(); | 296 Instr->setDestRedefined(); |
289 Context.insert(NewInst); | 297 Context.insert(Instr); |
| 298 if (Instr->isMultiDest()) { |
| 299 // If Instr is multi-dest, then Dest must be a Variable64On32. We add a |
| 300 // fake-def for Instr.DestHi here. |
| 301 assert(llvm::isa<Variable64On32>(Dest)); |
| 302 Context.insert(InstFakeDef::create(Func, Instr->getDestHi())); |
| 303 } |
290 } | 304 } |
291 /// The Operand can only be a 16-bit immediate or a ConstantRelocatable (with | 305 /// The Operand can only be a 16-bit immediate or a ConstantRelocatable (with |
292 /// an upper16 relocation). | 306 /// an upper16 relocation). |
293 void _movt(Variable *Dest, Operand *Src0, | 307 void _movt(Variable *Dest, Operand *Src0, |
294 CondARM32::Cond Pred = CondARM32::AL) { | 308 CondARM32::Cond Pred = CondARM32::AL) { |
295 Context.insert(InstARM32Movt::create(Func, Dest, Src0, Pred)); | 309 Context.insert(InstARM32Movt::create(Func, Dest, Src0, Pred)); |
296 } | 310 } |
297 void _movw(Variable *Dest, Operand *Src0, | 311 void _movw(Variable *Dest, Operand *Src0, |
298 CondARM32::Cond Pred = CondARM32::AL) { | 312 CondARM32::Cond Pred = CondARM32::AL) { |
299 Context.insert(InstARM32Movw::create(Func, Dest, Src0, Pred)); | 313 Context.insert(InstARM32Movw::create(Func, Dest, Src0, Pred)); |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 | 555 |
542 private: | 556 private: |
543 ~TargetHeaderARM32() = default; | 557 ~TargetHeaderARM32() = default; |
544 | 558 |
545 TargetARM32Features CPUFeatures; | 559 TargetARM32Features CPUFeatures; |
546 }; | 560 }; |
547 | 561 |
548 } // end of namespace Ice | 562 } // end of namespace Ice |
549 | 563 |
550 #endif // SUBZERO_SRC_ICETARGETLOWERINGARM32_H | 564 #endif // SUBZERO_SRC_ICETARGETLOWERINGARM32_H |
OLD | NEW |