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 1350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1361 InstARM32Extract(const InstARM32Extract &) = delete; | 1361 InstARM32Extract(const InstARM32Extract &) = delete; |
1362 InstARM32Extract &operator=(const InstARM32Extract &) = delete; | 1362 InstARM32Extract &operator=(const InstARM32Extract &) = delete; |
1363 | 1363 |
1364 public: | 1364 public: |
1365 static InstARM32Extract *create(Cfg *Func, Variable *Dest, Variable *Src0, | 1365 static InstARM32Extract *create(Cfg *Func, Variable *Dest, Variable *Src0, |
1366 uint32_t Index, CondARM32::Cond Predicate) { | 1366 uint32_t Index, CondARM32::Cond Predicate) { |
1367 return new (Func->allocate<InstARM32Extract>()) | 1367 return new (Func->allocate<InstARM32Extract>()) |
1368 InstARM32Extract(Func, Dest, Src0, Index, Predicate); | 1368 InstARM32Extract(Func, Dest, Src0, Index, Predicate); |
1369 } | 1369 } |
1370 void emit(const Cfg *Func) const override; | 1370 void emit(const Cfg *Func) const override; |
| 1371 void emitIAS(const Cfg *Func) const override; |
1371 static bool classof(const Inst *Inst) { return isClassof(Inst, Extract); } | 1372 static bool classof(const Inst *Inst) { return isClassof(Inst, Extract); } |
1372 | 1373 |
1373 private: | 1374 private: |
1374 InstARM32Extract(Cfg *Func, Variable *Dest, Variable *Src0, uint32_t Index, | 1375 InstARM32Extract(Cfg *Func, Variable *Dest, Variable *Src0, uint32_t Index, |
1375 CondARM32::Cond Predicate) | 1376 CondARM32::Cond Predicate) |
1376 : InstARM32Pred(Func, InstARM32::Extract, 1, Dest, Predicate), | 1377 : InstARM32Pred(Func, InstARM32::Extract, 1, Dest, Predicate), |
1377 Index(Index) { | 1378 Index(Index) { |
1378 assert(Index < typeNumElements(Src0->getType())); | 1379 assert(Index < typeNumElements(Src0->getType())); |
1379 addSource(Src0); | 1380 addSource(Src0); |
1380 } | 1381 } |
1381 | 1382 |
1382 const uint32_t Index; | 1383 const uint32_t Index; |
1383 }; | 1384 }; |
1384 | 1385 |
1385 /// Generates vmov Dn[x], Rd instructions, and their related floating point | 1386 /// Generates vmov Dn[x], Rd instructions, and their related floating point |
1386 /// versions. | 1387 /// versions. |
1387 class InstARM32Insert final : public InstARM32Pred { | 1388 class InstARM32Insert final : public InstARM32Pred { |
1388 InstARM32Insert() = delete; | 1389 InstARM32Insert() = delete; |
1389 InstARM32Insert(const InstARM32Insert &) = delete; | 1390 InstARM32Insert(const InstARM32Insert &) = delete; |
1390 InstARM32Insert &operator=(const InstARM32Insert &) = delete; | 1391 InstARM32Insert &operator=(const InstARM32Insert &) = delete; |
1391 | 1392 |
1392 public: | 1393 public: |
1393 static InstARM32Insert *create(Cfg *Func, Variable *Dest, Variable *Src0, | 1394 static InstARM32Insert *create(Cfg *Func, Variable *Dest, Variable *Src0, |
1394 uint32_t Index, CondARM32::Cond Predicate) { | 1395 uint32_t Index, CondARM32::Cond Predicate) { |
1395 return new (Func->allocate<InstARM32Insert>()) | 1396 return new (Func->allocate<InstARM32Insert>()) |
1396 InstARM32Insert(Func, Dest, Src0, Index, Predicate); | 1397 InstARM32Insert(Func, Dest, Src0, Index, Predicate); |
1397 } | 1398 } |
1398 void emit(const Cfg *Func) const override; | 1399 void emit(const Cfg *Func) const override; |
| 1400 void emitIAS(const Cfg *Func) const override; |
1399 static bool classof(const Inst *Inst) { return isClassof(Inst, Insert); } | 1401 static bool classof(const Inst *Inst) { return isClassof(Inst, Insert); } |
1400 | 1402 |
1401 private: | 1403 private: |
1402 InstARM32Insert(Cfg *Func, Variable *Dest, Variable *Src0, uint32_t Index, | 1404 InstARM32Insert(Cfg *Func, Variable *Dest, Variable *Src0, uint32_t Index, |
1403 CondARM32::Cond Predicate) | 1405 CondARM32::Cond Predicate) |
1404 : InstARM32Pred(Func, InstARM32::Insert, 1, Dest, Predicate), | 1406 : InstARM32Pred(Func, InstARM32::Insert, 1, Dest, Predicate), |
1405 Index(Index) { | 1407 Index(Index) { |
1406 assert(Index < typeNumElements(Dest->getType())); | 1408 assert(Index < typeNumElements(Dest->getType())); |
1407 addSource(Src0); | 1409 addSource(Src0); |
1408 } | 1410 } |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1518 // violations and link errors. | 1520 // violations and link errors. |
1519 | 1521 |
1520 template <> void InstARM32Ldr::emit(const Cfg *Func) const; | 1522 template <> void InstARM32Ldr::emit(const Cfg *Func) const; |
1521 template <> void InstARM32Movw::emit(const Cfg *Func) const; | 1523 template <> void InstARM32Movw::emit(const Cfg *Func) const; |
1522 template <> void InstARM32Movt::emit(const Cfg *Func) const; | 1524 template <> void InstARM32Movt::emit(const Cfg *Func) const; |
1523 | 1525 |
1524 } // end of namespace ARM32 | 1526 } // end of namespace ARM32 |
1525 } // end of namespace Ice | 1527 } // end of namespace Ice |
1526 | 1528 |
1527 #endif // SUBZERO_SRC_ICEINSTARM32_H | 1529 #endif // SUBZERO_SRC_ICEINSTARM32_H |
OLD | NEW |