| 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 29 matching lines...) Expand all Loading... |
| 40 return IsEbpBasedFrame ? Reg_ebp : Reg_esp; | 40 return IsEbpBasedFrame ? Reg_ebp : Reg_esp; |
| 41 } | 41 } |
| 42 virtual size_t typeWidthInBytesOnStack(Type Ty) { | 42 virtual size_t typeWidthInBytesOnStack(Type Ty) { |
| 43 // Round up to the next multiple of 4 bytes. In particular, i1, | 43 // Round up to the next multiple of 4 bytes. In particular, i1, |
| 44 // i8, and i16 are rounded up to 4 bytes. | 44 // i8, and i16 are rounded up to 4 bytes. |
| 45 return (typeWidthInBytes(Ty) + 3) & ~3; | 45 return (typeWidthInBytes(Ty) + 3) & ~3; |
| 46 } | 46 } |
| 47 virtual void emitVariable(const Variable *Var, const Cfg *Func) const; | 47 virtual void emitVariable(const Variable *Var, const Cfg *Func) const; |
| 48 virtual void addProlog(CfgNode *Node); | 48 virtual void addProlog(CfgNode *Node); |
| 49 virtual void addEpilog(CfgNode *Node); | 49 virtual void addEpilog(CfgNode *Node); |
| 50 virtual void emitConstants() const; |
| 50 SizeT makeNextLabelNumber() { return NextLabelNumber++; } | 51 SizeT makeNextLabelNumber() { return NextLabelNumber++; } |
| 51 // Ensure that a 64-bit Variable has been split into 2 32-bit | 52 // Ensure that a 64-bit Variable has been split into 2 32-bit |
| 52 // Variables, creating them if necessary. This is needed for all | 53 // Variables, creating them if necessary. This is needed for all |
| 53 // I64 operations, and it is needed for pushing F64 arguments for | 54 // I64 operations, and it is needed for pushing F64 arguments for |
| 54 // function calls using the 32-bit push instruction (though the | 55 // function calls using the 32-bit push instruction (though the |
| 55 // latter could be done by directly writing to the stack). | 56 // latter could be done by directly writing to the stack). |
| 56 void split64(Variable *Var); | 57 void split64(Variable *Var); |
| 57 void setArgOffsetAndCopy(Variable *Arg, Variable *FramePtr, | 58 void setArgOffsetAndCopy(Variable *Arg, Variable *FramePtr, |
| 58 int32_t BasicFrameOffset, int32_t &InArgsSizeBytes); | 59 int32_t BasicFrameOffset, int32_t &InArgsSizeBytes); |
| 59 Operand *loOperand(Operand *Operand); | 60 Operand *loOperand(Operand *Operand); |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 llvm::SmallBitVector RegsUsed; | 255 llvm::SmallBitVector RegsUsed; |
| 255 SizeT NextLabelNumber; | 256 SizeT NextLabelNumber; |
| 256 bool ComputedLiveRanges; | 257 bool ComputedLiveRanges; |
| 257 VarList PhysicalRegisters; | 258 VarList PhysicalRegisters; |
| 258 static IceString RegNames[]; | 259 static IceString RegNames[]; |
| 259 | 260 |
| 260 private: | 261 private: |
| 261 TargetX8632(const TargetX8632 &) LLVM_DELETED_FUNCTION; | 262 TargetX8632(const TargetX8632 &) LLVM_DELETED_FUNCTION; |
| 262 TargetX8632 &operator=(const TargetX8632 &) LLVM_DELETED_FUNCTION; | 263 TargetX8632 &operator=(const TargetX8632 &) LLVM_DELETED_FUNCTION; |
| 263 virtual ~TargetX8632() {} | 264 virtual ~TargetX8632() {} |
| 265 template <typename T> void emitConstantPool() const; |
| 264 }; | 266 }; |
| 265 | 267 |
| 268 template <> void ConstantFloat::emit(const Cfg *Func) const; |
| 269 template <> void ConstantDouble::emit(const Cfg *Func) const; |
| 270 |
| 266 } // end of namespace Ice | 271 } // end of namespace Ice |
| 267 | 272 |
| 268 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8632_H | 273 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8632_H |
| OLD | NEW |