OLD | NEW |
---|---|
1 //===- subzero/src/IceTargetLoweringMIPS32.h - MIPS32 lowering ---*- C++-*-===// | 1 //===- subzero/src/IceTargetLoweringMIPS32.h - MIPS32 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 TargetLoweringMIPS32 class, which implements the | 10 // This file declares the TargetLoweringMIPS32 class, which implements the |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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 | 56 |
57 const char *getConstantPrefix() const final { return ""; } | 57 const char *getConstantPrefix() const final { return ""; } |
58 void emit(const ConstantUndef *C) const final { | 58 void emit(const ConstantUndef *C) const final { |
59 llvm::report_fatal_error("Not yet implemented"); | 59 llvm::report_fatal_error("Not yet implemented: constantundef"); |
60 } | 60 } |
61 void emit(const ConstantInteger32 *C) const final { | 61 void emit(const ConstantInteger32 *C) const final { |
62 llvm::report_fatal_error("Not yet implemented"); | 62 llvm::report_fatal_error("Not yet implemented: constantinteger32"); |
63 } | 63 } |
64 void emit(const ConstantInteger64 *C) const final { | 64 void emit(const ConstantInteger64 *C) const final { |
65 llvm::report_fatal_error("Not yet implemented"); | 65 llvm::report_fatal_error("Not yet implemented: constantinteger64"); |
66 } | 66 } |
67 void emit(const ConstantFloat *C) const final { | 67 void emit(const ConstantFloat *C) const final { |
68 llvm::report_fatal_error("Not yet implemented"); | 68 llvm::report_fatal_error("Not yet implemented: constantfloat"); |
69 } | 69 } |
70 void emit(const ConstantDouble *C) const final { | 70 void emit(const ConstantDouble *C) const final { |
71 llvm::report_fatal_error("Not yet implemented"); | 71 llvm::report_fatal_error("Not yet implemented: constantdouble"); |
72 } | |
73 | |
74 void _ret(Variable *LR, Variable *Src0 = nullptr) { | |
jvoung (off chromium)
2015/06/12 19:39:13
LR -> RA
| |
75 Context.insert(InstMIPS32Ret::create(Func, LR, Src0)); | |
72 } | 76 } |
73 | 77 |
74 void lowerArguments() override; | 78 void lowerArguments() override; |
75 void addProlog(CfgNode *Node) override; | 79 void addProlog(CfgNode *Node) override; |
76 void addEpilog(CfgNode *Node) override; | 80 void addEpilog(CfgNode *Node) override; |
77 | 81 |
78 protected: | 82 protected: |
79 explicit TargetMIPS32(Cfg *Func); | 83 explicit TargetMIPS32(Cfg *Func); |
80 | 84 |
81 void postLower() override; | 85 void postLower() override; |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
140 | 144 |
141 private: | 145 private: |
142 void lowerGlobal(const VariableDeclaration &Var) const; | 146 void lowerGlobal(const VariableDeclaration &Var) const; |
143 ~TargetDataMIPS32() override {} | 147 ~TargetDataMIPS32() override {} |
144 template <typename T> static void emitConstantPool(GlobalContext *Ctx); | 148 template <typename T> static void emitConstantPool(GlobalContext *Ctx); |
145 }; | 149 }; |
146 | 150 |
147 } // end of namespace Ice | 151 } // end of namespace Ice |
148 | 152 |
149 #endif // SUBZERO_SRC_ICETARGETLOWERINGMIPS32_H | 153 #endif // SUBZERO_SRC_ICETARGETLOWERINGMIPS32_H |
OLD | NEW |