OLD | NEW |
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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 typedef uint32_t LegalMask; | 146 typedef uint32_t LegalMask; |
147 Operand *legalize(Operand *From, LegalMask Allowed = Legal_All, | 147 Operand *legalize(Operand *From, LegalMask Allowed = Legal_All, |
148 int32_t RegNum = Variable::NoRegister); | 148 int32_t RegNum = Variable::NoRegister); |
149 Variable *legalizeToVar(Operand *From, int32_t RegNum = Variable::NoRegister); | 149 Variable *legalizeToVar(Operand *From, int32_t RegNum = Variable::NoRegister); |
150 // Turn a pointer operand into a memory operand that can be | 150 // Turn a pointer operand into a memory operand that can be |
151 // used by a real load/store operation. Legalizes the operand as well. | 151 // used by a real load/store operation. Legalizes the operand as well. |
152 // This is a nop if the operand is already a legal memory operand. | 152 // This is a nop if the operand is already a legal memory operand. |
153 OperandX8632Mem *FormMemoryOperand(Operand *Ptr, Type Ty); | 153 OperandX8632Mem *FormMemoryOperand(Operand *Ptr, Type Ty); |
154 | 154 |
155 Variable *makeReg(Type Ty, int32_t RegNum = Variable::NoRegister); | 155 Variable *makeReg(Type Ty, int32_t RegNum = Variable::NoRegister); |
| 156 // Make a call to an external helper function. |
156 InstCall *makeHelperCall(const IceString &Name, Variable *Dest, | 157 InstCall *makeHelperCall(const IceString &Name, Variable *Dest, |
157 SizeT MaxSrcs) { | 158 SizeT MaxSrcs) { |
158 const bool SuppressMangling = true; | |
159 const bool HasTailCall = false; | 159 const bool HasTailCall = false; |
160 const RelocOffsetT Offset = 0; | 160 Constant *CallTarget = Ctx->getConstantExternSym(Name); |
161 Constant *CallTarget = Ctx->getConstantSym(Offset, Name, SuppressMangling); | |
162 InstCall *Call = | 161 InstCall *Call = |
163 InstCall::create(Func, MaxSrcs, Dest, CallTarget, HasTailCall); | 162 InstCall::create(Func, MaxSrcs, Dest, CallTarget, HasTailCall); |
164 return Call; | 163 return Call; |
165 } | 164 } |
166 static Type stackSlotType(); | 165 static Type stackSlotType(); |
167 | 166 |
168 Variable *copyToReg(Operand *Src, int32_t RegNum = Variable::NoRegister); | 167 Variable *copyToReg(Operand *Src, int32_t RegNum = Variable::NoRegister); |
169 | 168 |
170 // Returns a vector in a register with the given constant entries. | 169 // Returns a vector in a register with the given constant entries. |
171 Variable *makeVectorOfZeros(Type Ty, int32_t RegNum = Variable::NoRegister); | 170 Variable *makeVectorOfZeros(Type Ty, int32_t RegNum = Variable::NoRegister); |
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
511 }; | 510 }; |
512 | 511 |
513 template <> void ConstantInteger32::emit(GlobalContext *Ctx) const; | 512 template <> void ConstantInteger32::emit(GlobalContext *Ctx) const; |
514 template <> void ConstantInteger64::emit(GlobalContext *Ctx) const; | 513 template <> void ConstantInteger64::emit(GlobalContext *Ctx) const; |
515 template <> void ConstantFloat::emit(GlobalContext *Ctx) const; | 514 template <> void ConstantFloat::emit(GlobalContext *Ctx) const; |
516 template <> void ConstantDouble::emit(GlobalContext *Ctx) const; | 515 template <> void ConstantDouble::emit(GlobalContext *Ctx) const; |
517 | 516 |
518 } // end of namespace Ice | 517 } // end of namespace Ice |
519 | 518 |
520 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8632_H | 519 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8632_H |
OLD | NEW |