| OLD | NEW |
| 1 //===- subzero/src/IceInstX8632.h - Low-level x86 instructions --*- C++ -*-===// | 1 //===- subzero/src/IceInstX8632.h - Low-level x86 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 // This file declares the InstX8632 and OperandX8632 classes and | 10 // This file declares the InstX8632 and OperandX8632 classes and |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 // SpillVariable decorates a Variable by linking it to another | 145 // SpillVariable decorates a Variable by linking it to another |
| 146 // Variable. When stack frame offsets are computed, the SpillVariable | 146 // Variable. When stack frame offsets are computed, the SpillVariable |
| 147 // is given a distinct stack slot only if its linked Variable has a | 147 // is given a distinct stack slot only if its linked Variable has a |
| 148 // register. If the linked Variable has a stack slot, then the | 148 // register. If the linked Variable has a stack slot, then the |
| 149 // Variable and SpillVariable share that slot. | 149 // Variable and SpillVariable share that slot. |
| 150 class SpillVariable : public Variable { | 150 class SpillVariable : public Variable { |
| 151 SpillVariable(const SpillVariable &) = delete; | 151 SpillVariable(const SpillVariable &) = delete; |
| 152 SpillVariable &operator=(const SpillVariable &) = delete; | 152 SpillVariable &operator=(const SpillVariable &) = delete; |
| 153 | 153 |
| 154 public: | 154 public: |
| 155 static SpillVariable *create(Cfg *Func, Type Ty, SizeT Index, | 155 static SpillVariable *create(Cfg *Func, Type Ty, SizeT Index) { |
| 156 const IceString &Name) { | 156 return new (Func->allocate<SpillVariable>()) SpillVariable(Ty, Index); |
| 157 return new (Func->allocate<SpillVariable>()) SpillVariable(Ty, Index, Name); | |
| 158 } | 157 } |
| 159 const static OperandKind SpillVariableKind = | 158 const static OperandKind SpillVariableKind = |
| 160 static_cast<OperandKind>(kVariable_Target); | 159 static_cast<OperandKind>(kVariable_Target); |
| 161 static bool classof(const Operand *Operand) { | 160 static bool classof(const Operand *Operand) { |
| 162 return Operand->getKind() == SpillVariableKind; | 161 return Operand->getKind() == SpillVariableKind; |
| 163 } | 162 } |
| 164 void setLinkedTo(Variable *Var) { LinkedTo = Var; } | 163 void setLinkedTo(Variable *Var) { LinkedTo = Var; } |
| 165 Variable *getLinkedTo() const { return LinkedTo; } | 164 Variable *getLinkedTo() const { return LinkedTo; } |
| 166 // Inherit dump() and emit() from Variable. | 165 // Inherit dump() and emit() from Variable. |
| 167 private: | 166 private: |
| 168 SpillVariable(Type Ty, SizeT Index, const IceString &Name) | 167 SpillVariable(Type Ty, SizeT Index) |
| 169 : Variable(SpillVariableKind, Ty, Index, Name), LinkedTo(NULL) {} | 168 : Variable(SpillVariableKind, Ty, Index), LinkedTo(NULL) {} |
| 170 Variable *LinkedTo; | 169 Variable *LinkedTo; |
| 171 }; | 170 }; |
| 172 | 171 |
| 173 class InstX8632 : public InstTarget { | 172 class InstX8632 : public InstTarget { |
| 174 InstX8632(const InstX8632 &) = delete; | 173 InstX8632(const InstX8632 &) = delete; |
| 175 InstX8632 &operator=(const InstX8632 &) = delete; | 174 InstX8632 &operator=(const InstX8632 &) = delete; |
| 176 | 175 |
| 177 public: | 176 public: |
| 178 enum InstKindX8632 { | 177 enum InstKindX8632 { |
| 179 k__Start = Inst::Target, | 178 k__Start = Inst::Target, |
| (...skipping 1411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1591 template <> void InstX8632Pinsr::emitIAS(const Cfg *Func) const; | 1590 template <> void InstX8632Pinsr::emitIAS(const Cfg *Func) const; |
| 1592 template <> void InstX8632Movsx::emitIAS(const Cfg *Func) const; | 1591 template <> void InstX8632Movsx::emitIAS(const Cfg *Func) const; |
| 1593 template <> void InstX8632Movzx::emitIAS(const Cfg *Func) const; | 1592 template <> void InstX8632Movzx::emitIAS(const Cfg *Func) const; |
| 1594 template <> void InstX8632Pmull::emitIAS(const Cfg *Func) const; | 1593 template <> void InstX8632Pmull::emitIAS(const Cfg *Func) const; |
| 1595 template <> void InstX8632Pshufd::emitIAS(const Cfg *Func) const; | 1594 template <> void InstX8632Pshufd::emitIAS(const Cfg *Func) const; |
| 1596 template <> void InstX8632Shufps::emitIAS(const Cfg *Func) const; | 1595 template <> void InstX8632Shufps::emitIAS(const Cfg *Func) const; |
| 1597 | 1596 |
| 1598 } // end of namespace Ice | 1597 } // end of namespace Ice |
| 1599 | 1598 |
| 1600 #endif // SUBZERO_SRC_ICEINSTX8632_H | 1599 #endif // SUBZERO_SRC_ICEINSTX8632_H |
| OLD | NEW |