OLD | NEW |
1 //===- subzero/src/IceTargetLoweringARM32.h - ARM32 lowering ----*- C++ -*-===// | 1 //===- subzero/src/IceTargetLoweringARM32.h - ARM32 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 TargetLoweringARM32 class, which implements the | 10 // This file declares the TargetLoweringARM32 class, which implements the |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 bool hasFramePointer() const override { return UsesFramePointer; } | 46 bool hasFramePointer() const override { return UsesFramePointer; } |
47 SizeT getFrameOrStackReg() const override { | 47 SizeT getFrameOrStackReg() const override { |
48 return UsesFramePointer ? RegARM32::Reg_fp : RegARM32::Reg_sp; | 48 return UsesFramePointer ? RegARM32::Reg_fp : RegARM32::Reg_sp; |
49 } | 49 } |
50 size_t typeWidthInBytesOnStack(Type Ty) const override { | 50 size_t typeWidthInBytesOnStack(Type Ty) const override { |
51 // Round up to the next multiple of 4 bytes. In particular, i1, | 51 // Round up to the next multiple of 4 bytes. In particular, i1, |
52 // i8, and i16 are rounded up to 4 bytes. | 52 // i8, and i16 are rounded up to 4 bytes. |
53 return (typeWidthInBytes(Ty) + 3) & ~3; | 53 return (typeWidthInBytes(Ty) + 3) & ~3; |
54 } | 54 } |
55 void emitVariable(const Variable *Var) const override; | 55 void emitVariable(const Variable *Var) const override; |
| 56 |
| 57 const char *getConstantPrefix() const final { return "#"; } |
| 58 void emit(const ConstantUndef *C) const final; |
| 59 void emit(const ConstantInteger32 *C) const final; |
| 60 void emit(const ConstantInteger64 *C) const final; |
| 61 void emit(const ConstantFloat *C) const final; |
| 62 void emit(const ConstantDouble *C) const final; |
| 63 |
56 void lowerArguments() override; | 64 void lowerArguments() override; |
57 void addProlog(CfgNode *Node) override; | 65 void addProlog(CfgNode *Node) override; |
58 void addEpilog(CfgNode *Node) override; | 66 void addEpilog(CfgNode *Node) override; |
59 | 67 |
60 protected: | 68 protected: |
61 explicit TargetARM32(Cfg *Func); | 69 explicit TargetARM32(Cfg *Func); |
62 | 70 |
63 void postLower() override; | 71 void postLower() override; |
64 | 72 |
65 void lowerAlloca(const InstAlloca *Inst) override; | 73 void lowerAlloca(const InstAlloca *Inst) override; |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 | 138 |
131 private: | 139 private: |
132 void lowerGlobal(const VariableDeclaration &Var) const; | 140 void lowerGlobal(const VariableDeclaration &Var) const; |
133 ~TargetDataARM32() override {} | 141 ~TargetDataARM32() override {} |
134 template <typename T> static void emitConstantPool(GlobalContext *Ctx); | 142 template <typename T> static void emitConstantPool(GlobalContext *Ctx); |
135 }; | 143 }; |
136 | 144 |
137 } // end of namespace Ice | 145 } // end of namespace Ice |
138 | 146 |
139 #endif // SUBZERO_SRC_ICETARGETLOWERINGARM32_H | 147 #endif // SUBZERO_SRC_ICETARGETLOWERINGARM32_H |
OLD | NEW |