Chromium Code Reviews| 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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 188 Context.insert(InstX8632Imul::create(Func, Dest, Src0)); | 188 Context.insert(InstX8632Imul::create(Func, Dest, Src0)); |
| 189 } | 189 } |
| 190 void _mfence() { Context.insert(InstX8632Mfence::create(Func)); } | 190 void _mfence() { Context.insert(InstX8632Mfence::create(Func)); } |
| 191 // If Dest=NULL is passed in, then a new variable is created, marked | 191 // If Dest=NULL is passed in, then a new variable is created, marked |
| 192 // as infinite register allocation weight, and returned through the | 192 // as infinite register allocation weight, and returned through the |
| 193 // in/out Dest argument. | 193 // in/out Dest argument. |
| 194 void _mov(Variable *&Dest, Operand *Src0, | 194 void _mov(Variable *&Dest, Operand *Src0, |
| 195 int32_t RegNum = Variable::NoRegister) { | 195 int32_t RegNum = Variable::NoRegister) { |
| 196 if (Dest == NULL) { | 196 if (Dest == NULL) { |
| 197 Dest = legalizeToVar(Src0, false, RegNum); | 197 Dest = legalizeToVar(Src0, false, RegNum); |
| 198 } else if (typeNumElements(Dest->getType()) > 1) { | |
| 199 Context.insert(InstX8632Movp::create(Func, Dest, Src0)); | |
|
jvoung (off chromium)
2014/06/26 00:45:41
I wonder if this should just be a separate _movp()
wala
2014/06/26 17:32:42
I'll add a _movp function. However, there are a fe
jvoung (off chromium)
2014/06/26 23:33:46
Okay, yeah I was worried there might be some recur
| |
| 198 } else { | 200 } else { |
| 199 Context.insert(InstX8632Mov::create(Func, Dest, Src0)); | 201 Context.insert(InstX8632Mov::create(Func, Dest, Src0)); |
| 200 } | 202 } |
| 201 } | 203 } |
| 202 void _movq(Variable *Dest, Operand *Src0) { | 204 void _movq(Variable *Dest, Operand *Src0) { |
| 203 Context.insert(InstX8632Movq::create(Func, Dest, Src0)); | 205 Context.insert(InstX8632Movq::create(Func, Dest, Src0)); |
| 204 } | 206 } |
| 205 void _movsx(Variable *Dest, Operand *Src0) { | 207 void _movsx(Variable *Dest, Operand *Src0) { |
| 206 Context.insert(InstX8632Movsx::create(Func, Dest, Src0)); | 208 Context.insert(InstX8632Movsx::create(Func, Dest, Src0)); |
| 207 } | 209 } |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 281 llvm::SmallBitVector RegsUsed; | 283 llvm::SmallBitVector RegsUsed; |
| 282 SizeT NextLabelNumber; | 284 SizeT NextLabelNumber; |
| 283 bool ComputedLiveRanges; | 285 bool ComputedLiveRanges; |
| 284 VarList PhysicalRegisters; | 286 VarList PhysicalRegisters; |
| 285 static IceString RegNames[]; | 287 static IceString RegNames[]; |
| 286 | 288 |
| 287 private: | 289 private: |
| 288 TargetX8632(const TargetX8632 &) LLVM_DELETED_FUNCTION; | 290 TargetX8632(const TargetX8632 &) LLVM_DELETED_FUNCTION; |
| 289 TargetX8632 &operator=(const TargetX8632 &) LLVM_DELETED_FUNCTION; | 291 TargetX8632 &operator=(const TargetX8632 &) LLVM_DELETED_FUNCTION; |
| 290 virtual ~TargetX8632() {} | 292 virtual ~TargetX8632() {} |
| 291 template <typename T> void emitConstantPool() const; | 293 template <typename T> void emitScalarConstantPool() const; |
| 294 void emitVectorConstantPool() const; | |
| 292 }; | 295 }; |
| 293 | 296 |
| 297 template <> void ConstantInteger::emit(GlobalContext *Ctx) const; | |
| 294 template <> void ConstantFloat::emit(GlobalContext *Ctx) const; | 298 template <> void ConstantFloat::emit(GlobalContext *Ctx) const; |
| 295 template <> void ConstantDouble::emit(GlobalContext *Ctx) const; | 299 template <> void ConstantDouble::emit(GlobalContext *Ctx) const; |
| 300 template <> void ConstantVector::emit(GlobalContext *Ctx) const; | |
| 301 template <> void ConstantBitVector::emit(GlobalContext *Ctx) const; | |
| 296 | 302 |
| 297 } // end of namespace Ice | 303 } // end of namespace Ice |
| 298 | 304 |
| 299 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8632_H | 305 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8632_H |
| OLD | NEW |