| 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 virtual void lowerInsertElement(const InstInsertElement *Inst); | 97 virtual void lowerInsertElement(const InstInsertElement *Inst); |
| 98 virtual void lowerLoad(const InstLoad *Inst); | 98 virtual void lowerLoad(const InstLoad *Inst); |
| 99 virtual void lowerPhi(const InstPhi *Inst); | 99 virtual void lowerPhi(const InstPhi *Inst); |
| 100 virtual void lowerRet(const InstRet *Inst); | 100 virtual void lowerRet(const InstRet *Inst); |
| 101 virtual void lowerSelect(const InstSelect *Inst); | 101 virtual void lowerSelect(const InstSelect *Inst); |
| 102 virtual void lowerStore(const InstStore *Inst); | 102 virtual void lowerStore(const InstStore *Inst); |
| 103 virtual void lowerSwitch(const InstSwitch *Inst); | 103 virtual void lowerSwitch(const InstSwitch *Inst); |
| 104 virtual void lowerUnreachable(const InstUnreachable *Inst); | 104 virtual void lowerUnreachable(const InstUnreachable *Inst); |
| 105 virtual void doAddressOptLoad(); | 105 virtual void doAddressOptLoad(); |
| 106 virtual void doAddressOptStore(); | 106 virtual void doAddressOptStore(); |
| 107 virtual void randomlyInsertNop(float Probability); |
| 107 | 108 |
| 108 // Naive lowering of cmpxchg. | 109 // Naive lowering of cmpxchg. |
| 109 void lowerAtomicCmpxchg(Variable *DestPrev, Operand *Ptr, Operand *Expected, | 110 void lowerAtomicCmpxchg(Variable *DestPrev, Operand *Ptr, Operand *Expected, |
| 110 Operand *Desired); | 111 Operand *Desired); |
| 111 // Attempt a more optimized lowering of cmpxchg. Returns true if optimized. | 112 // Attempt a more optimized lowering of cmpxchg. Returns true if optimized. |
| 112 bool tryOptimizedCmpxchgCmpBr(Variable *DestPrev, Operand *Ptr, | 113 bool tryOptimizedCmpxchgCmpBr(Variable *DestPrev, Operand *Ptr, |
| 113 Operand *Expected, Operand *Desired); | 114 Operand *Expected, Operand *Desired); |
| 114 void lowerAtomicRMW(Variable *Dest, uint32_t Operation, Operand *Ptr, | 115 void lowerAtomicRMW(Variable *Dest, uint32_t Operation, Operand *Ptr, |
| 115 Operand *Val); | 116 Operand *Val); |
| 116 void lowerCountZeros(bool Cttz, Type Ty, Variable *Dest, Operand *FirstVal, | 117 void lowerCountZeros(bool Cttz, Type Ty, Variable *Dest, Operand *FirstVal, |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 } | 321 } |
| 321 void _mulps(Variable *Dest, Operand *Src0) { | 322 void _mulps(Variable *Dest, Operand *Src0) { |
| 322 Context.insert(InstX8632Mulps::create(Func, Dest, Src0)); | 323 Context.insert(InstX8632Mulps::create(Func, Dest, Src0)); |
| 323 } | 324 } |
| 324 void _mulss(Variable *Dest, Operand *Src0) { | 325 void _mulss(Variable *Dest, Operand *Src0) { |
| 325 Context.insert(InstX8632Mulss::create(Func, Dest, Src0)); | 326 Context.insert(InstX8632Mulss::create(Func, Dest, Src0)); |
| 326 } | 327 } |
| 327 void _neg(Variable *SrcDest) { | 328 void _neg(Variable *SrcDest) { |
| 328 Context.insert(InstX8632Neg::create(Func, SrcDest)); | 329 Context.insert(InstX8632Neg::create(Func, SrcDest)); |
| 329 } | 330 } |
| 331 void _nop(SizeT Variant) { |
| 332 Context.insert(InstX8632Nop::create(Func, Variant)); |
| 333 } |
| 330 void _or(Variable *Dest, Operand *Src0) { | 334 void _or(Variable *Dest, Operand *Src0) { |
| 331 Context.insert(InstX8632Or::create(Func, Dest, Src0)); | 335 Context.insert(InstX8632Or::create(Func, Dest, Src0)); |
| 332 } | 336 } |
| 333 void _padd(Variable *Dest, Operand *Src0) { | 337 void _padd(Variable *Dest, Operand *Src0) { |
| 334 Context.insert(InstX8632Padd::create(Func, Dest, Src0)); | 338 Context.insert(InstX8632Padd::create(Func, Dest, Src0)); |
| 335 } | 339 } |
| 336 void _pand(Variable *Dest, Operand *Src0) { | 340 void _pand(Variable *Dest, Operand *Src0) { |
| 337 Context.insert(InstX8632Pand::create(Func, Dest, Src0)); | 341 Context.insert(InstX8632Pand::create(Func, Dest, Src0)); |
| 338 } | 342 } |
| 339 void _pandn(Variable *Dest, Operand *Src0) { | 343 void _pandn(Variable *Dest, Operand *Src0) { |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 495 virtual ~TargetGlobalInitX8632() {} | 499 virtual ~TargetGlobalInitX8632() {} |
| 496 }; | 500 }; |
| 497 | 501 |
| 498 template <> void ConstantInteger::emit(GlobalContext *Ctx) const; | 502 template <> void ConstantInteger::emit(GlobalContext *Ctx) const; |
| 499 template <> void ConstantFloat::emit(GlobalContext *Ctx) const; | 503 template <> void ConstantFloat::emit(GlobalContext *Ctx) const; |
| 500 template <> void ConstantDouble::emit(GlobalContext *Ctx) const; | 504 template <> void ConstantDouble::emit(GlobalContext *Ctx) const; |
| 501 | 505 |
| 502 } // end of namespace Ice | 506 } // end of namespace Ice |
| 503 | 507 |
| 504 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8632_H | 508 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8632_H |
| OLD | NEW |