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

Side by Side Diff: src/IceTargetLoweringX8632.h

Issue 385133006: Various improvements related to legalization code. (Closed) Base URL: https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Patch Set: Created 6 years, 5 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 | « no previous file | src/IceTargetLoweringX8632.cpp » ('j') | src/IceTargetLoweringX8632.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- subzero/src/IceTargetLoweringX8632.h - x86-32 lowering ---*- C++ -*-===// 1 //===- subzero/src/IceTargetLoweringX8632.h - x86-32 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 // This file declares the TargetLoweringX8632 class, which 10 // This file declares the TargetLoweringX8632 class, which
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 int32_t RegNum = Variable::NoRegister); 123 int32_t RegNum = Variable::NoRegister);
124 // Turn a pointer operand into a memory operand that can be 124 // Turn a pointer operand into a memory operand that can be
125 // used by a real load/store operation. Legalizes the operand as well. 125 // used by a real load/store operation. Legalizes the operand as well.
126 // This is a nop if the operand is already a legal memory operand. 126 // This is a nop if the operand is already a legal memory operand.
127 OperandX8632Mem *FormMemoryOperand(Operand *Ptr, Type Ty); 127 OperandX8632Mem *FormMemoryOperand(Operand *Ptr, Type Ty);
128 128
129 Variable *makeReg(Type Ty, int32_t RegNum = Variable::NoRegister); 129 Variable *makeReg(Type Ty, int32_t RegNum = Variable::NoRegister);
130 InstCall *makeHelperCall(const IceString &Name, Variable *Dest, 130 InstCall *makeHelperCall(const IceString &Name, Variable *Dest,
131 SizeT MaxSrcs) { 131 SizeT MaxSrcs) {
132 bool SuppressMangling = true; 132 bool SuppressMangling = true;
133 Type Ty = Dest ? Dest->getType() : IceType_void; 133 const Type FunctionPointerType = IceType_i32;
134 Constant *CallTarget = Ctx->getConstantSym(Ty, 0, Name, SuppressMangling); 134 Constant *CallTarget =
Jim Stichnoth 2014/07/14 19:44:17 This makes me a little nervous, based on previous
135 Ctx->getConstantSym(FunctionPointerType, 0, Name, SuppressMangling);
135 InstCall *Call = InstCall::create(Func, MaxSrcs, Dest, CallTarget); 136 InstCall *Call = InstCall::create(Func, MaxSrcs, Dest, CallTarget);
136 return Call; 137 return Call;
137 } 138 }
138 static Type stackSlotType(); 139 static Type stackSlotType();
139 140
140 Variable *copyToReg(Operand *Src, int32_t RegNum = Variable::NoRegister); 141 Variable *copyToReg(Operand *Src, int32_t RegNum = Variable::NoRegister);
141 142
142 // The following are helpers that insert lowered x86 instructions 143 // The following are helpers that insert lowered x86 instructions
143 // with minimal syntactic overhead, so that the lowering code can 144 // with minimal syntactic overhead, so that the lowering code can
144 // look as close to assembly as practical. 145 // look as close to assembly as practical.
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 virtual ~TargetGlobalInitX8632() {} 338 virtual ~TargetGlobalInitX8632() {}
338 }; 339 };
339 340
340 template <> void ConstantInteger::emit(GlobalContext *Ctx) const; 341 template <> void ConstantInteger::emit(GlobalContext *Ctx) const;
341 template <> void ConstantFloat::emit(GlobalContext *Ctx) const; 342 template <> void ConstantFloat::emit(GlobalContext *Ctx) const;
342 template <> void ConstantDouble::emit(GlobalContext *Ctx) const; 343 template <> void ConstantDouble::emit(GlobalContext *Ctx) const;
343 344
344 } // end of namespace Ice 345 } // end of namespace Ice
345 346
346 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8632_H 347 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8632_H
OLDNEW
« no previous file with comments | « no previous file | src/IceTargetLoweringX8632.cpp » ('j') | src/IceTargetLoweringX8632.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698