OLD | NEW |
1 //===- subzero/src/IceTargetLoweringX86Base.h - x86 lowering ----*- C++ -*-===// | 1 //===- subzero/src/IceTargetLoweringX86Base.h - x86 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 154 matching lines...) Loading... |
165 return MaxOutArgsSizeBytes; | 165 return MaxOutArgsSizeBytes; |
166 } | 166 } |
167 virtual void updateMaxOutArgsSizeBytes(uint32_t Size) { | 167 virtual void updateMaxOutArgsSizeBytes(uint32_t Size) { |
168 MaxOutArgsSizeBytes = std::max(MaxOutArgsSizeBytes, Size); | 168 MaxOutArgsSizeBytes = std::max(MaxOutArgsSizeBytes, Size); |
169 } | 169 } |
170 | 170 |
171 bool shouldSplitToVariable64On32(Type Ty) const override { | 171 bool shouldSplitToVariable64On32(Type Ty) const override { |
172 return Traits::Is64Bit ? false : Ty == IceType_i64; | 172 return Traits::Is64Bit ? false : Ty == IceType_i64; |
173 } | 173 } |
174 | 174 |
| 175 ConstantRelocatable *createGetIPForRegister(const Variable *Dest) { |
| 176 assert(Dest->hasReg()); |
| 177 const IceString RegName = Traits::getRegName(Dest->getRegNum()); |
| 178 return llvm::cast<ConstantRelocatable>( |
| 179 Ctx->getConstantExternSym(H_getIP_prefix + RegName)); |
| 180 } |
| 181 |
175 SizeT getMinJumpTableSize() const override { return 4; } | 182 SizeT getMinJumpTableSize() const override { return 4; } |
176 | 183 |
177 void emitVariable(const Variable *Var) const override; | 184 void emitVariable(const Variable *Var) const override; |
178 | 185 |
179 void emit(const ConstantInteger32 *C) const final; | 186 void emit(const ConstantInteger32 *C) const final; |
180 void emit(const ConstantInteger64 *C) const final; | 187 void emit(const ConstantInteger64 *C) const final; |
181 void emit(const ConstantFloat *C) const final; | 188 void emit(const ConstantFloat *C) const final; |
182 void emit(const ConstantDouble *C) const final; | 189 void emit(const ConstantDouble *C) const final; |
183 void emit(const ConstantUndef *C) const final; | 190 void emit(const ConstantUndef *C) const final; |
184 void emit(const ConstantRelocatable *C) const final; | 191 void emit(const ConstantRelocatable *C) const final; |
(...skipping 934 matching lines...) Loading... |
1119 | 1126 |
1120 explicit TargetHeaderX86(GlobalContext *Ctx) : TargetHeaderLowering(Ctx) {} | 1127 explicit TargetHeaderX86(GlobalContext *Ctx) : TargetHeaderLowering(Ctx) {} |
1121 }; | 1128 }; |
1122 | 1129 |
1123 } // end of namespace X86NAMESPACE | 1130 } // end of namespace X86NAMESPACE |
1124 } // end of namespace Ice | 1131 } // end of namespace Ice |
1125 | 1132 |
1126 #include "IceTargetLoweringX86BaseImpl.h" | 1133 #include "IceTargetLoweringX86BaseImpl.h" |
1127 | 1134 |
1128 #endif // SUBZERO_SRC_ICETARGETLOWERINGX86BASE_H | 1135 #endif // SUBZERO_SRC_ICETARGETLOWERINGX86BASE_H |
OLD | NEW |