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 27 matching lines...) Expand all Loading... |
38 } | 38 } |
39 virtual bool hasFramePointer() const { return IsEbpBasedFrame; } | 39 virtual bool hasFramePointer() const { return IsEbpBasedFrame; } |
40 virtual SizeT getFrameOrStackReg() const { | 40 virtual SizeT getFrameOrStackReg() const { |
41 return IsEbpBasedFrame ? Reg_ebp : Reg_esp; | 41 return IsEbpBasedFrame ? Reg_ebp : Reg_esp; |
42 } | 42 } |
43 virtual size_t typeWidthInBytesOnStack(Type Ty) const { | 43 virtual size_t typeWidthInBytesOnStack(Type Ty) const { |
44 // Round up to the next multiple of 4 bytes. In particular, i1, | 44 // Round up to the next multiple of 4 bytes. In particular, i1, |
45 // i8, and i16 are rounded up to 4 bytes. | 45 // i8, and i16 are rounded up to 4 bytes. |
46 return (typeWidthInBytes(Ty) + 3) & ~3; | 46 return (typeWidthInBytes(Ty) + 3) & ~3; |
47 } | 47 } |
| 48 virtual SizeT getBundleP2Align() const { return 5; } |
48 virtual void emitVariable(const Variable *Var, const Cfg *Func) const; | 49 virtual void emitVariable(const Variable *Var, const Cfg *Func) const; |
49 virtual void lowerArguments(); | 50 virtual void lowerArguments(); |
50 virtual void addProlog(CfgNode *Node); | 51 virtual void addProlog(CfgNode *Node); |
51 virtual void addEpilog(CfgNode *Node); | 52 virtual void addEpilog(CfgNode *Node); |
52 virtual void emitConstants() const; | 53 virtual void emitConstants() const; |
53 SizeT makeNextLabelNumber() { return NextLabelNumber++; } | 54 SizeT makeNextLabelNumber() { return NextLabelNumber++; } |
54 // Ensure that a 64-bit Variable has been split into 2 32-bit | 55 // Ensure that a 64-bit Variable has been split into 2 32-bit |
55 // Variables, creating them if necessary. This is needed for all | 56 // Variables, creating them if necessary. This is needed for all |
56 // I64 operations, and it is needed for pushing F64 arguments for | 57 // I64 operations, and it is needed for pushing F64 arguments for |
57 // function calls using the 32-bit push instruction (though the | 58 // function calls using the 32-bit push instruction (though the |
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
499 virtual ~TargetGlobalInitX8632() {} | 500 virtual ~TargetGlobalInitX8632() {} |
500 }; | 501 }; |
501 | 502 |
502 template <> void ConstantInteger::emit(GlobalContext *Ctx) const; | 503 template <> void ConstantInteger::emit(GlobalContext *Ctx) const; |
503 template <> void ConstantFloat::emit(GlobalContext *Ctx) const; | 504 template <> void ConstantFloat::emit(GlobalContext *Ctx) const; |
504 template <> void ConstantDouble::emit(GlobalContext *Ctx) const; | 505 template <> void ConstantDouble::emit(GlobalContext *Ctx) const; |
505 | 506 |
506 } // end of namespace Ice | 507 } // end of namespace Ice |
507 | 508 |
508 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8632_H | 509 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8632_H |
OLD | NEW |