Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(250)

Side by Side Diff: src/IceTargetLoweringMIPS32.h

Issue 1326013002: Refactor Lo and Hi out of Variable. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Refactor Hi and Lo out of Variable Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/IceTargetLoweringARM32.cpp ('k') | src/IceTargetLoweringX8632.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 /// \file 10 /// \file
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 bool hasFramePointer() const override { return UsesFramePointer; } 50 bool hasFramePointer() const override { return UsesFramePointer; }
51 SizeT getFrameOrStackReg() const override { 51 SizeT getFrameOrStackReg() const override {
52 return UsesFramePointer ? RegMIPS32::Reg_FP : RegMIPS32::Reg_SP; 52 return UsesFramePointer ? RegMIPS32::Reg_FP : RegMIPS32::Reg_SP;
53 } 53 }
54 size_t typeWidthInBytesOnStack(Type Ty) const override { 54 size_t typeWidthInBytesOnStack(Type Ty) const override {
55 // Round up to the next multiple of 4 bytes. In particular, i1, i8, and i16 55 // Round up to the next multiple of 4 bytes. In particular, i1, i8, and i16
56 // are rounded up to 4 bytes. 56 // are rounded up to 4 bytes.
57 return (typeWidthInBytes(Ty) + 3) & ~3; 57 return (typeWidthInBytes(Ty) + 3) & ~3;
58 } 58 }
59 59
60 bool shouldSplitToVariable64On32(Type Ty) const override {
61 return Ty == IceType_i64;
62 }
63
60 // TODO(ascull): what is the best size of MIPS? 64 // TODO(ascull): what is the best size of MIPS?
61 SizeT getMinJumpTableSize() const override { return 3; } 65 SizeT getMinJumpTableSize() const override { return 3; }
62 void emitJumpTable(const Cfg *Func, 66 void emitJumpTable(const Cfg *Func,
63 const InstJumpTable *JumpTable) const override; 67 const InstJumpTable *JumpTable) const override;
64 68
65 void emitVariable(const Variable *Var) const override; 69 void emitVariable(const Variable *Var) const override;
66 70
67 const char *getConstantPrefix() const final { return ""; } 71 const char *getConstantPrefix() const final { return ""; }
68 void emit(const ConstantUndef *C) const final { 72 void emit(const ConstantUndef *C) const final {
69 (void)C; 73 (void)C;
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 protected: 180 protected:
177 explicit TargetHeaderMIPS32(GlobalContext *Ctx); 181 explicit TargetHeaderMIPS32(GlobalContext *Ctx);
178 182
179 private: 183 private:
180 ~TargetHeaderMIPS32() = default; 184 ~TargetHeaderMIPS32() = default;
181 }; 185 };
182 186
183 } // end of namespace Ice 187 } // end of namespace Ice
184 188
185 #endif // SUBZERO_SRC_ICETARGETLOWERINGMIPS32_H 189 #endif // SUBZERO_SRC_ICETARGETLOWERINGMIPS32_H
OLDNEW
« no previous file with comments | « src/IceTargetLoweringARM32.cpp ('k') | src/IceTargetLoweringX8632.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698