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

Side by Side Diff: src/IceTargetLoweringMIPS32.h

Issue 1234803007: Introduction of improved switch lowering. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Formatting tweaks. Created 5 years, 5 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
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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 } 46 }
47 bool hasFramePointer() const override { return UsesFramePointer; } 47 bool hasFramePointer() const override { return UsesFramePointer; }
48 SizeT getFrameOrStackReg() const override { 48 SizeT getFrameOrStackReg() const override {
49 return UsesFramePointer ? RegMIPS32::Reg_FP : RegMIPS32::Reg_SP; 49 return UsesFramePointer ? RegMIPS32::Reg_FP : RegMIPS32::Reg_SP;
50 } 50 }
51 size_t typeWidthInBytesOnStack(Type Ty) const override { 51 size_t typeWidthInBytesOnStack(Type Ty) const override {
52 // Round up to the next multiple of 4 bytes. In particular, i1, 52 // Round up to the next multiple of 4 bytes. In particular, i1,
53 // i8, and i16 are rounded up to 4 bytes. 53 // i8, and i16 are rounded up to 4 bytes.
54 return (typeWidthInBytes(Ty) + 3) & ~3; 54 return (typeWidthInBytes(Ty) + 3) & ~3;
55 } 55 }
56
57 // TODO(ascull): what is the best size of ARM?
58 SizeT getMinJumpTableSize() const override { return 3; }
59
56 void emitVariable(const Variable *Var) const override; 60 void emitVariable(const Variable *Var) const override;
57 61
58 const char *getConstantPrefix() const final { return ""; } 62 const char *getConstantPrefix() const final { return ""; }
59 void emit(const ConstantUndef *C) const final { 63 void emit(const ConstantUndef *C) const final {
60 (void)C; 64 (void)C;
61 llvm::report_fatal_error("Not yet implemented"); 65 llvm::report_fatal_error("Not yet implemented");
62 } 66 }
63 void emit(const ConstantInteger32 *C) const final { 67 void emit(const ConstantInteger32 *C) const final {
64 (void)C; 68 (void)C;
65 llvm::report_fatal_error("Not yet implemented"); 69 llvm::report_fatal_error("Not yet implemented");
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 protected: 170 protected:
167 explicit TargetHeaderMIPS32(GlobalContext *Ctx); 171 explicit TargetHeaderMIPS32(GlobalContext *Ctx);
168 172
169 private: 173 private:
170 ~TargetHeaderMIPS32() = default; 174 ~TargetHeaderMIPS32() = default;
171 }; 175 };
172 176
173 } // end of namespace Ice 177 } // end of namespace Ice
174 178
175 #endif // SUBZERO_SRC_ICETARGETLOWERINGMIPS32_H 179 #endif // SUBZERO_SRC_ICETARGETLOWERINGMIPS32_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698