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

Side by Side Diff: src/IceTargetLoweringX8632.h

Issue 1216033004: Move X8632-specific Assembler stuff to Machine Traits. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Addresses comments. 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
« no previous file with comments | « src/IceRegistersX8664.h ('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 // This file declares the TargetLoweringX8632 class, which 10 // This file declares the TargetLoweringX8632 class, which
11 // implements the TargetLowering interface for the x86-32 11 // implements the TargetLowering interface for the x86-32
12 // architecture. 12 // architecture.
13 // 13 //
14 //===----------------------------------------------------------------------===// 14 //===----------------------------------------------------------------------===//
15 15
16 #ifndef SUBZERO_SRC_ICETARGETLOWERINGX8632_H 16 #ifndef SUBZERO_SRC_ICETARGETLOWERINGX8632_H
17 #define SUBZERO_SRC_ICETARGETLOWERINGX8632_H 17 #define SUBZERO_SRC_ICETARGETLOWERINGX8632_H
18 18
19 #include "IceAssemblerX8632.h" 19 #include "IceAssemblerX8632.h"
20 #include "IceDefs.h" 20 #include "IceDefs.h"
21 #include "IceInstX8632.h" 21 #include "IceInstX8632.h"
22 #include "IceRegistersX8632.h" 22 #include "IceRegistersX8632.h"
23 #include "IceTargetLowering.h" 23 #include "IceTargetLowering.h"
24 #include "IceTargetLoweringX8632Traits.h"
24 25
25 namespace Ice { 26 namespace Ice {
26 27
27 class TargetX8632 : public TargetLowering { 28 class TargetX8632 : public TargetLowering {
28 TargetX8632() = delete; 29 TargetX8632() = delete;
29 TargetX8632(const TargetX8632 &) = delete; 30 TargetX8632(const TargetX8632 &) = delete;
30 TargetX8632 &operator=(const TargetX8632 &) = delete; 31 TargetX8632 &operator=(const TargetX8632 &) = delete;
31 32
32 public: 33 public:
33 enum X86InstructionSet { 34 using X86InstructionSet = X8632::Traits::InstructionSet;
34 Begin,
35 // SSE2 is the PNaCl baseline instruction set.
36 SSE2 = Begin,
37 SSE4_1,
38 End
39 };
40 35
41 static TargetX8632 *create(Cfg *Func); 36 static TargetX8632 *create(Cfg *Func);
42 virtual X8632::Address stackVarToAsmOperand(const Variable *Var) const = 0; 37 virtual X8632::Traits::Address
38 stackVarToAsmOperand(const Variable *Var) const = 0;
43 virtual X86InstructionSet getInstructionSet() const = 0; 39 virtual X86InstructionSet getInstructionSet() const = 0;
44 40
45 protected: 41 protected:
46 explicit TargetX8632(Cfg *Func) : TargetLowering(Func) {} 42 explicit TargetX8632(Cfg *Func) : TargetLowering(Func) {}
47 }; 43 };
48 44
49 class TargetDataX8632 final : public TargetDataLowering { 45 class TargetDataX8632 final : public TargetDataLowering {
50 TargetDataX8632() = delete; 46 TargetDataX8632() = delete;
51 TargetDataX8632(const TargetDataX8632 &) = delete; 47 TargetDataX8632(const TargetDataX8632 &) = delete;
52 TargetDataX8632 &operator=(const TargetDataX8632 &) = delete; 48 TargetDataX8632 &operator=(const TargetDataX8632 &) = delete;
(...skipping 28 matching lines...) Expand all
81 protected: 77 protected:
82 explicit TargetHeaderX8632(GlobalContext *Ctx); 78 explicit TargetHeaderX8632(GlobalContext *Ctx);
83 79
84 private: 80 private:
85 ~TargetHeaderX8632() = default; 81 ~TargetHeaderX8632() = default;
86 }; 82 };
87 83
88 } // end of namespace Ice 84 } // end of namespace Ice
89 85
90 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8632_H 86 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8632_H
OLDNEW
« no previous file with comments | « src/IceRegistersX8664.h ('k') | src/IceTargetLoweringX8632.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698