| 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 767 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 778 void _sdiv(Variable *Dest, Variable *Src0, Variable *Src1, | 778 void _sdiv(Variable *Dest, Variable *Src0, Variable *Src1, |
| 779 CondARM32::Cond Pred = CondARM32::AL) { | 779 CondARM32::Cond Pred = CondARM32::AL) { |
| 780 Context.insert<InstARM32Sdiv>(Dest, Src0, Src1, Pred); | 780 Context.insert<InstARM32Sdiv>(Dest, Src0, Src1, Pred); |
| 781 } | 781 } |
| 782 /// _str, for all your Variable to memory transfers. Addr has the same | 782 /// _str, for all your Variable to memory transfers. Addr has the same |
| 783 /// restrictions that it does in _ldr. | 783 /// restrictions that it does in _ldr. |
| 784 void _str(Variable *Value, OperandARM32Mem *Addr, | 784 void _str(Variable *Value, OperandARM32Mem *Addr, |
| 785 CondARM32::Cond Pred = CondARM32::AL) { | 785 CondARM32::Cond Pred = CondARM32::AL) { |
| 786 Context.insert<InstARM32Str>(Value, Addr, Pred); | 786 Context.insert<InstARM32Str>(Value, Addr, Pred); |
| 787 } | 787 } |
| 788 void _strex(Variable *Dest, Variable *Value, OperandARM32Mem *Addr, | 788 InstARM32Strex *_strex(Variable *Dest, Variable *Value, OperandARM32Mem *Addr, |
| 789 CondARM32::Cond Pred = CondARM32::AL) { | 789 CondARM32::Cond Pred = CondARM32::AL) { |
| 790 // strex requires Dest to be a register other than Value or Addr. This | |
| 791 // restriction is cleanly represented by adding an "early" definition of | |
| 792 // Dest (or a latter use of all the sources.) | |
| 793 Context.insert<InstFakeDef>(Dest); | |
| 794 if (auto *Value64 = llvm::dyn_cast<Variable64On32>(Value)) { | 790 if (auto *Value64 = llvm::dyn_cast<Variable64On32>(Value)) { |
| 795 Context.insert<InstFakeUse>(Value64->getLo()); | 791 Context.insert<InstFakeUse>(Value64->getLo()); |
| 796 Context.insert<InstFakeUse>(Value64->getHi()); | 792 Context.insert<InstFakeUse>(Value64->getHi()); |
| 797 } | 793 } |
| 798 auto *Instr = Context.insert<InstARM32Strex>(Dest, Value, Addr, Pred); | 794 return Context.insert<InstARM32Strex>(Dest, Value, Addr, Pred); |
| 799 Instr->setDestRedefined(); | |
| 800 } | 795 } |
| 801 void _sub(Variable *Dest, Variable *Src0, Operand *Src1, | 796 void _sub(Variable *Dest, Variable *Src0, Operand *Src1, |
| 802 CondARM32::Cond Pred = CondARM32::AL) { | 797 CondARM32::Cond Pred = CondARM32::AL) { |
| 803 Context.insert<InstARM32Sub>(Dest, Src0, Src1, Pred); | 798 Context.insert<InstARM32Sub>(Dest, Src0, Src1, Pred); |
| 804 } | 799 } |
| 805 void _subs(Variable *Dest, Variable *Src0, Operand *Src1, | 800 void _subs(Variable *Dest, Variable *Src0, Operand *Src1, |
| 806 CondARM32::Cond Pred = CondARM32::AL) { | 801 CondARM32::Cond Pred = CondARM32::AL) { |
| 807 constexpr bool SetFlags = true; | 802 constexpr bool SetFlags = true; |
| 808 Context.insert<InstARM32Sub>(Dest, Src0, Src1, Pred, SetFlags); | 803 Context.insert<InstARM32Sub>(Dest, Src0, Src1, Pred, SetFlags); |
| 809 if (SetFlags) { | 804 if (SetFlags) { |
| (...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1330 private: | 1325 private: |
| 1331 ~TargetHeaderARM32() = default; | 1326 ~TargetHeaderARM32() = default; |
| 1332 | 1327 |
| 1333 TargetARM32Features CPUFeatures; | 1328 TargetARM32Features CPUFeatures; |
| 1334 }; | 1329 }; |
| 1335 | 1330 |
| 1336 } // end of namespace ARM32 | 1331 } // end of namespace ARM32 |
| 1337 } // end of namespace Ice | 1332 } // end of namespace Ice |
| 1338 | 1333 |
| 1339 #endif // SUBZERO_SRC_ICETARGETLOWERINGARM32_H | 1334 #endif // SUBZERO_SRC_ICETARGETLOWERINGARM32_H |
| OLD | NEW |