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

Side by Side Diff: src/IceTargetLoweringX8632.h

Issue 1257283004: Iasm and obj lowering for advanced switch lowering. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Rebase Created 5 years, 4 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/IceTargetLoweringMIPS32.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/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 /// \file 10 /// \file
(...skipping 15 matching lines...) Expand all
26 #include "IceTargetLoweringX86Base.h" 26 #include "IceTargetLoweringX86Base.h"
27 27
28 namespace Ice { 28 namespace Ice {
29 29
30 class TargetX8632 final 30 class TargetX8632 final
31 : public ::Ice::X86Internal::TargetX86Base<TargetX8632> { 31 : public ::Ice::X86Internal::TargetX86Base<TargetX8632> {
32 TargetX8632() = delete; 32 TargetX8632() = delete;
33 TargetX8632(const TargetX8632 &) = delete; 33 TargetX8632(const TargetX8632 &) = delete;
34 TargetX8632 &operator=(const TargetX8632 &) = delete; 34 TargetX8632 &operator=(const TargetX8632 &) = delete;
35 35
36 void emitJumpTable(const Cfg *Func,
37 const InstJumpTable *JumpTable) const override;
38
36 public: 39 public:
37 using X86InstructionSet = X8632::Traits::InstructionSet; 40 using X86InstructionSet = X8632::Traits::InstructionSet;
38 41
39 static TargetX8632 *create(Cfg *Func) { return new TargetX8632(Func); } 42 static TargetX8632 *create(Cfg *Func) { return new TargetX8632(Func); }
40 43
41 protected: 44 protected:
42 Operand *createNaClReadTPSrcOperand() { 45 Operand *createNaClReadTPSrcOperand() {
43 Constant *Zero = Ctx->getConstantZero(IceType_i32); 46 Constant *Zero = Ctx->getConstantZero(IceType_i32);
44 return Traits::X86OperandMem::create(Func, IceType_i32, nullptr, Zero, 47 return Traits::X86OperandMem::create(Func, IceType_i32, nullptr, Zero,
45 nullptr, 0, 48 nullptr, 0,
(...skipping 12 matching lines...) Expand all
58 TargetDataX8632 &operator=(const TargetDataX8632 &) = delete; 61 TargetDataX8632 &operator=(const TargetDataX8632 &) = delete;
59 62
60 public: 63 public:
61 static std::unique_ptr<TargetDataLowering> create(GlobalContext *Ctx) { 64 static std::unique_ptr<TargetDataLowering> create(GlobalContext *Ctx) {
62 return std::unique_ptr<TargetDataLowering>(new TargetDataX8632(Ctx)); 65 return std::unique_ptr<TargetDataLowering>(new TargetDataX8632(Ctx));
63 } 66 }
64 67
65 void lowerGlobals(const VariableDeclarationList &Vars, 68 void lowerGlobals(const VariableDeclarationList &Vars,
66 const IceString &SectionSuffix) override; 69 const IceString &SectionSuffix) override;
67 void lowerConstants() override; 70 void lowerConstants() override;
71 void lowerJumpTables() override;
68 72
69 protected: 73 protected:
70 explicit TargetDataX8632(GlobalContext *Ctx); 74 explicit TargetDataX8632(GlobalContext *Ctx);
71 75
72 private: 76 private:
73 ~TargetDataX8632() override = default; 77 ~TargetDataX8632() override = default;
74 template <typename T> static void emitConstantPool(GlobalContext *Ctx); 78 template <typename T> static void emitConstantPool(GlobalContext *Ctx);
75 }; 79 };
76 80
77 class TargetHeaderX8632 final : public TargetHeaderLowering { 81 class TargetHeaderX8632 final : public TargetHeaderLowering {
78 TargetHeaderX8632() = delete; 82 TargetHeaderX8632() = delete;
79 TargetHeaderX8632(const TargetHeaderX8632 &) = delete; 83 TargetHeaderX8632(const TargetHeaderX8632 &) = delete;
80 TargetHeaderX8632 &operator=(const TargetHeaderX8632 &) = delete; 84 TargetHeaderX8632 &operator=(const TargetHeaderX8632 &) = delete;
81 85
82 public: 86 public:
83 static std::unique_ptr<TargetHeaderLowering> create(GlobalContext *Ctx) { 87 static std::unique_ptr<TargetHeaderLowering> create(GlobalContext *Ctx) {
84 return std::unique_ptr<TargetHeaderLowering>(new TargetHeaderX8632(Ctx)); 88 return std::unique_ptr<TargetHeaderLowering>(new TargetHeaderX8632(Ctx));
85 } 89 }
86 90
87 protected: 91 protected:
88 explicit TargetHeaderX8632(GlobalContext *Ctx); 92 explicit TargetHeaderX8632(GlobalContext *Ctx);
89 93
90 private: 94 private:
91 ~TargetHeaderX8632() = default; 95 ~TargetHeaderX8632() = default;
92 }; 96 };
93 97
94 } // end of namespace Ice 98 } // end of namespace Ice
95 99
96 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8632_H 100 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8632_H
OLDNEW
« no previous file with comments | « src/IceTargetLoweringMIPS32.cpp ('k') | src/IceTargetLoweringX8632.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698