| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 return TypeToRegisterSet[Ty]; | 76 return TypeToRegisterSet[Ty]; |
| 77 } | 77 } |
| 78 bool hasFramePointer() const override { return IsEbpBasedFrame; } | 78 bool hasFramePointer() const override { return IsEbpBasedFrame; } |
| 79 SizeT getFrameOrStackReg() const override { | 79 SizeT getFrameOrStackReg() const override { |
| 80 return IsEbpBasedFrame ? Traits::RegisterSet::Reg_ebp | 80 return IsEbpBasedFrame ? Traits::RegisterSet::Reg_ebp |
| 81 : Traits::RegisterSet::Reg_esp; | 81 : Traits::RegisterSet::Reg_esp; |
| 82 } | 82 } |
| 83 size_t typeWidthInBytesOnStack(Type Ty) const override { | 83 size_t typeWidthInBytesOnStack(Type Ty) const override { |
| 84 // Round up to the next multiple of 4 bytes. In particular, i1, | 84 // Round up to the next multiple of 4 bytes. In particular, i1, |
| 85 // i8, and i16 are rounded up to 4 bytes. | 85 // i8, and i16 are rounded up to 4 bytes. |
| 86 // TODO(jpp): this needs to round to multiples of 8 bytes in x86-64. |
| 86 return (typeWidthInBytes(Ty) + 3) & ~3; | 87 return (typeWidthInBytes(Ty) + 3) & ~3; |
| 87 } | 88 } |
| 88 | 89 |
| 89 SizeT getMinJumpTableSize() const override { return 4; } | 90 SizeT getMinJumpTableSize() const override { return 4; } |
| 90 | 91 |
| 91 void emitVariable(const Variable *Var) const override; | 92 void emitVariable(const Variable *Var) const override; |
| 92 | 93 |
| 93 const char *getConstantPrefix() const final { return "$"; } | 94 const char *getConstantPrefix() const final { return "$"; } |
| 94 void emit(const ConstantUndef *C) const final; | 95 void emit(const ConstantUndef *C) const final; |
| 95 void emit(const ConstantInteger32 *C) const final; | 96 void emit(const ConstantInteger32 *C) const final; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 120 | 121 |
| 121 protected: | 122 protected: |
| 122 explicit TargetX86Base(Cfg *Func); | 123 explicit TargetX86Base(Cfg *Func); |
| 123 | 124 |
| 124 void postLower() override; | 125 void postLower() override; |
| 125 | 126 |
| 126 void lowerAlloca(const InstAlloca *Inst) override; | 127 void lowerAlloca(const InstAlloca *Inst) override; |
| 127 void lowerArithmetic(const InstArithmetic *Inst) override; | 128 void lowerArithmetic(const InstArithmetic *Inst) override; |
| 128 void lowerAssign(const InstAssign *Inst) override; | 129 void lowerAssign(const InstAssign *Inst) override; |
| 129 void lowerBr(const InstBr *Inst) override; | 130 void lowerBr(const InstBr *Inst) override; |
| 130 void lowerCall(const InstCall *Inst) override; | |
| 131 void lowerCast(const InstCast *Inst) override; | 131 void lowerCast(const InstCast *Inst) override; |
| 132 void lowerExtractElement(const InstExtractElement *Inst) override; | 132 void lowerExtractElement(const InstExtractElement *Inst) override; |
| 133 void lowerFcmp(const InstFcmp *Inst) override; | 133 void lowerFcmp(const InstFcmp *Inst) override; |
| 134 void lowerIcmp(const InstIcmp *Inst) override; | 134 void lowerIcmp(const InstIcmp *Inst) override; |
| 135 void lowerIntrinsicCall(const InstIntrinsicCall *Inst) override; | 135 void lowerIntrinsicCall(const InstIntrinsicCall *Inst) override; |
| 136 void lowerInsertElement(const InstInsertElement *Inst) override; | 136 void lowerInsertElement(const InstInsertElement *Inst) override; |
| 137 void lowerLoad(const InstLoad *Inst) override; | 137 void lowerLoad(const InstLoad *Inst) override; |
| 138 void lowerPhi(const InstPhi *Inst) override; | 138 void lowerPhi(const InstPhi *Inst) override; |
| 139 void lowerRet(const InstRet *Inst) override; | 139 void lowerRet(const InstRet *Inst) override; |
| 140 void lowerSelect(const InstSelect *Inst) override; | 140 void lowerSelect(const InstSelect *Inst) override; |
| (...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 627 } | 627 } |
| 628 | 628 |
| 629 BoolFolding FoldingInfo; | 629 BoolFolding FoldingInfo; |
| 630 }; | 630 }; |
| 631 } // end of namespace X86Internal | 631 } // end of namespace X86Internal |
| 632 } // end of namespace Ice | 632 } // end of namespace Ice |
| 633 | 633 |
| 634 #include "IceTargetLoweringX86BaseImpl.h" | 634 #include "IceTargetLoweringX86BaseImpl.h" |
| 635 | 635 |
| 636 #endif // SUBZERO_SRC_ICETARGETLOWERINGX86BASE_H | 636 #endif // SUBZERO_SRC_ICETARGETLOWERINGX86BASE_H |
| OLD | NEW |