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

Side by Side Diff: src/IceTargetLoweringX8632.h

Issue 1257643004: Subzero. Buildable, non-functional TargetLoweringX8664. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: git pull 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/IceInstX86Base.h ('k') | src/IceTargetLoweringX8664.h » ('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 23 matching lines...) Expand all
34 TargetX8632 &operator=(const TargetX8632 &) = delete; 34 TargetX8632 &operator=(const TargetX8632 &) = delete;
35 35
36 void emitJumpTable(const Cfg *Func, 36 void emitJumpTable(const Cfg *Func,
37 const InstJumpTable *JumpTable) const override; 37 const InstJumpTable *JumpTable) const override;
38 38
39 public: 39 public:
40 using X86InstructionSet = X8632::Traits::InstructionSet; 40 using X86InstructionSet = X8632::Traits::InstructionSet;
41 41
42 static TargetX8632 *create(Cfg *Func) { return new TargetX8632(Func); } 42 static TargetX8632 *create(Cfg *Func) { return new TargetX8632(Func); }
43 43
44 protected: 44 private:
45 friend class ::Ice::X86Internal::TargetX86Base<TargetX8632>;
46
45 Operand *createNaClReadTPSrcOperand() { 47 Operand *createNaClReadTPSrcOperand() {
46 Constant *Zero = Ctx->getConstantZero(IceType_i32); 48 Constant *Zero = Ctx->getConstantZero(IceType_i32);
47 return Traits::X86OperandMem::create(Func, IceType_i32, nullptr, Zero, 49 return Traits::X86OperandMem::create(Func, IceType_i32, nullptr, Zero,
48 nullptr, 0, 50 nullptr, 0,
49 Traits::X86OperandMem::SegReg_GS); 51 Traits::X86OperandMem::SegReg_GS);
50 } 52 }
51 53
52 private:
53 friend class ::Ice::X86Internal::TargetX86Base<TargetX8632>;
54
55 explicit TargetX8632(Cfg *Func) : TargetX86Base(Func) {} 54 explicit TargetX8632(Cfg *Func) : TargetX86Base(Func) {}
56 }; 55 };
57 56
58 class TargetDataX8632 final : public TargetDataLowering { 57 class TargetDataX8632 final : public TargetDataLowering {
59 TargetDataX8632() = delete; 58 TargetDataX8632() = delete;
60 TargetDataX8632(const TargetDataX8632 &) = delete; 59 TargetDataX8632(const TargetDataX8632 &) = delete;
61 TargetDataX8632 &operator=(const TargetDataX8632 &) = delete; 60 TargetDataX8632 &operator=(const TargetDataX8632 &) = delete;
62 61
63 public: 62 public:
63 ~TargetDataX8632() override = default;
64
64 static std::unique_ptr<TargetDataLowering> create(GlobalContext *Ctx) { 65 static std::unique_ptr<TargetDataLowering> create(GlobalContext *Ctx) {
65 return std::unique_ptr<TargetDataLowering>(new TargetDataX8632(Ctx)); 66 return makeUnique<TargetDataX8632>(Ctx);
66 } 67 }
67 68
68 void lowerGlobals(const VariableDeclarationList &Vars, 69 void lowerGlobals(const VariableDeclarationList &Vars,
69 const IceString &SectionSuffix) override; 70 const IceString &SectionSuffix) override;
70 void lowerConstants() override; 71 void lowerConstants() override;
71 void lowerJumpTables() override; 72 void lowerJumpTables() override;
72 73
73 protected: 74 private:
75 ENABLE_MAKE_UNIQUE;
76
74 explicit TargetDataX8632(GlobalContext *Ctx); 77 explicit TargetDataX8632(GlobalContext *Ctx);
75
76 private:
77 ~TargetDataX8632() override = default;
78 template <typename T> static void emitConstantPool(GlobalContext *Ctx); 78 template <typename T> static void emitConstantPool(GlobalContext *Ctx);
79 }; 79 };
80 80
81 class TargetHeaderX8632 final : public TargetHeaderLowering { 81 class TargetHeaderX8632 final : public TargetHeaderLowering {
82 TargetHeaderX8632() = delete; 82 TargetHeaderX8632() = delete;
83 TargetHeaderX8632(const TargetHeaderX8632 &) = delete; 83 TargetHeaderX8632(const TargetHeaderX8632 &) = delete;
84 TargetHeaderX8632 &operator=(const TargetHeaderX8632 &) = delete; 84 TargetHeaderX8632 &operator=(const TargetHeaderX8632 &) = delete;
85 85
86 public: 86 public:
87 static std::unique_ptr<TargetHeaderLowering> create(GlobalContext *Ctx) { 87 static std::unique_ptr<TargetHeaderLowering> create(GlobalContext *Ctx) {
88 return std::unique_ptr<TargetHeaderLowering>(new TargetHeaderX8632(Ctx)); 88 return std::unique_ptr<TargetHeaderLowering>(new TargetHeaderX8632(Ctx));
89 } 89 }
90 90
91 protected: 91 protected:
92 explicit TargetHeaderX8632(GlobalContext *Ctx); 92 explicit TargetHeaderX8632(GlobalContext *Ctx);
93 93
94 private: 94 private:
95 ~TargetHeaderX8632() = default; 95 ~TargetHeaderX8632() = default;
96 }; 96 };
97 97
98 } // end of namespace Ice 98 } // end of namespace Ice
99 99
100 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8632_H 100 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8632_H
OLDNEW
« no previous file with comments | « src/IceInstX86Base.h ('k') | src/IceTargetLoweringX8664.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698