Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(141)

Side by Side Diff: src/IceInstX8632.h

Issue 586943003: Subzero: Change the way bitcast stack slot lowering is handled. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Add clarifying comment to asType() Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/IceCfgNode.cpp ('k') | src/IceOperand.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 NumVars = 1; 128 NumVars = 1;
129 } 129 }
130 VariableSplit(const VariableSplit &) LLVM_DELETED_FUNCTION; 130 VariableSplit(const VariableSplit &) LLVM_DELETED_FUNCTION;
131 VariableSplit &operator=(const VariableSplit &) LLVM_DELETED_FUNCTION; 131 VariableSplit &operator=(const VariableSplit &) LLVM_DELETED_FUNCTION;
132 virtual ~VariableSplit() { Func->deallocateArrayOf<Variable *>(Vars); } 132 virtual ~VariableSplit() { Func->deallocateArrayOf<Variable *>(Vars); }
133 Cfg *Func; // Held only for the destructor. 133 Cfg *Func; // Held only for the destructor.
134 Variable *Var; 134 Variable *Var;
135 Portion Part; 135 Portion Part;
136 }; 136 };
137 137
138 // SpillVariable decorates a Variable by linking it to another
139 // Variable. When stack frame offsets are computed, the SpillVariable
140 // is given a distinct stack slot only if its linked Variable has a
141 // register. If the linked Variable has a stack slot, then the
142 // Variable and SpillVariable share that slot.
143 class SpillVariable : public Variable {
144 public:
145 static SpillVariable *create(Cfg *Func, Type Ty, const CfgNode *Node,
146 SizeT Index, const IceString &Name) {
147 return new (Func->allocate<SpillVariable>())
148 SpillVariable(Ty, Node, Index, Name);
149 }
150 const static OperandKind SpillVariableKind =
151 static_cast<OperandKind>(kVariable_Target);
152 static bool classof(const Operand *Operand) {
153 return Operand->getKind() == SpillVariableKind;
154 }
155 void setLinkedTo(Variable *Var) { LinkedTo = Var; }
156 Variable *getLinkedTo() const { return LinkedTo; }
157 // Inherit dump() and emit() from Variable.
158 private:
159 SpillVariable(Type Ty, const CfgNode *Node, SizeT Index,
160 const IceString &Name)
161 : Variable(SpillVariableKind, Ty, Node, Index, Name), LinkedTo(NULL) {}
162 Variable *LinkedTo;
163 };
164
138 class InstX8632 : public InstTarget { 165 class InstX8632 : public InstTarget {
139 public: 166 public:
140 enum InstKindX8632 { 167 enum InstKindX8632 {
141 k__Start = Inst::Target, 168 k__Start = Inst::Target,
142 Adc, 169 Adc,
143 Add, 170 Add,
144 Addps, 171 Addps,
145 Addss, 172 Addss,
146 Adjuststack, 173 Adjuststack,
147 And, 174 And,
(...skipping 1106 matching lines...) Expand 10 before | Expand all | Expand 10 after
1254 template <> void InstX8632Pmuludq::emit(const Cfg *Func) const; 1281 template <> void InstX8632Pmuludq::emit(const Cfg *Func) const;
1255 template <> void InstX8632Psll::emit(const Cfg *Func) const; 1282 template <> void InstX8632Psll::emit(const Cfg *Func) const;
1256 template <> void InstX8632Psra::emit(const Cfg *Func) const; 1283 template <> void InstX8632Psra::emit(const Cfg *Func) const;
1257 template <> void InstX8632Psub::emit(const Cfg *Func) const; 1284 template <> void InstX8632Psub::emit(const Cfg *Func) const;
1258 template <> void InstX8632Sqrtss::emit(const Cfg *Func) const; 1285 template <> void InstX8632Sqrtss::emit(const Cfg *Func) const;
1259 template <> void InstX8632Subss::emit(const Cfg *Func) const; 1286 template <> void InstX8632Subss::emit(const Cfg *Func) const;
1260 1287
1261 } // end of namespace Ice 1288 } // end of namespace Ice
1262 1289
1263 #endif // SUBZERO_SRC_ICEINSTX8632_H 1290 #endif // SUBZERO_SRC_ICEINSTX8632_H
OLDNEW
« no previous file with comments | « src/IceCfgNode.cpp ('k') | src/IceOperand.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698