Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 //===- subzero/src/IceInstARM32.h - ARM32 machine instructions --*- C++ -*-===// | 1 //===- subzero/src/IceInstARM32.h - ARM32 machine instructions --*- 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 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 387 Clz, | 387 Clz, |
| 388 Cmn, | 388 Cmn, |
| 389 Cmp, | 389 Cmp, |
| 390 Dmb, | 390 Dmb, |
| 391 Eor, | 391 Eor, |
| 392 Label, | 392 Label, |
| 393 Ldr, | 393 Ldr, |
| 394 Ldrex, | 394 Ldrex, |
| 395 Lsl, | 395 Lsl, |
| 396 Lsr, | 396 Lsr, |
| 397 Nop, | |
| 397 Mla, | 398 Mla, |
| 398 Mls, | 399 Mls, |
| 399 Mov, | 400 Mov, |
| 400 Movt, | 401 Movt, |
| 401 Movw, | 402 Movw, |
| 402 Mul, | 403 Mul, |
| 403 Mvn, | 404 Mvn, |
| 404 Orr, | 405 Orr, |
| 405 Pop, | 406 Pop, |
| 406 Push, | 407 Push, |
| (...skipping 1020 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1427 } | 1428 } |
| 1428 void emit(const Cfg *Func) const override; | 1429 void emit(const Cfg *Func) const override; |
| 1429 void emitIAS(const Cfg *Func) const override; | 1430 void emitIAS(const Cfg *Func) const override; |
| 1430 void dump(const Cfg *Func) const override; | 1431 void dump(const Cfg *Func) const override; |
| 1431 static bool classof(const Inst *Instr) { return isClassof(Instr, Dmb); } | 1432 static bool classof(const Inst *Instr) { return isClassof(Instr, Dmb); } |
| 1432 | 1433 |
| 1433 private: | 1434 private: |
| 1434 explicit InstARM32Dmb(Cfg *Func); | 1435 explicit InstARM32Dmb(Cfg *Func); |
| 1435 }; | 1436 }; |
| 1436 | 1437 |
| 1438 class InstARM32Nop final : public InstARM32Pred { | |
|
Eric Holk
2016/02/08 17:29:43
Does it make sense to have Nop derive from a predi
Karl
2016/02/08 17:55:55
The ARM instruction allows predicates, and so like
Eric Holk
2016/02/08 17:58:15
That seems reasonable.
| |
| 1439 InstARM32Nop() = delete; | |
| 1440 InstARM32Nop(const InstARM32Nop &) = delete; | |
| 1441 InstARM32Nop &operator=(const InstARM32Nop &) = delete; | |
| 1442 | |
| 1443 public: | |
| 1444 static InstARM32Nop *create(Cfg *Func) { | |
| 1445 return new (Func->allocate<InstARM32Nop>()) InstARM32Nop(Func); | |
| 1446 } | |
| 1447 void emit(const Cfg *Func) const override; | |
| 1448 void emitIAS(const Cfg *Func) const override; | |
| 1449 void dump(const Cfg *Func) const override; | |
| 1450 static bool classof(const Inst *Instr) { return isClassof(Instr, Nop); } | |
| 1451 | |
| 1452 private: | |
| 1453 explicit InstARM32Nop(Cfg *Func); | |
| 1454 }; | |
| 1455 | |
| 1437 // Declare partial template specializations of emit() methods that already have | 1456 // Declare partial template specializations of emit() methods that already have |
| 1438 // default implementations. Without this, there is the possibility of ODR | 1457 // default implementations. Without this, there is the possibility of ODR |
| 1439 // violations and link errors. | 1458 // violations and link errors. |
| 1440 | 1459 |
| 1441 template <> void InstARM32Ldr::emit(const Cfg *Func) const; | 1460 template <> void InstARM32Ldr::emit(const Cfg *Func) const; |
| 1442 template <> void InstARM32Movw::emit(const Cfg *Func) const; | 1461 template <> void InstARM32Movw::emit(const Cfg *Func) const; |
| 1443 template <> void InstARM32Movt::emit(const Cfg *Func) const; | 1462 template <> void InstARM32Movt::emit(const Cfg *Func) const; |
| 1444 | 1463 |
| 1445 } // end of namespace ARM32 | 1464 } // end of namespace ARM32 |
| 1446 } // end of namespace Ice | 1465 } // end of namespace Ice |
| 1447 | 1466 |
| 1448 #endif // SUBZERO_SRC_ICEINSTARM32_H | 1467 #endif // SUBZERO_SRC_ICEINSTARM32_H |
| OLD | NEW |