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

Unified Diff: src/IceTargetLoweringX8632.h

Issue 1217443024: Changes the TargetX8632 to inherit from TargetX86Base<TargetX8632>. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: git pull 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/IceTargetLoweringX8632.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceTargetLoweringX8632.h
diff --git a/src/IceTargetLoweringX8632.h b/src/IceTargetLoweringX8632.h
index f1d8bb3565b25190569babf8f9f9ddf72ae80173..1f1d2cb0a2555507fc692c408b6044a93d40c8e4 100644
--- a/src/IceTargetLoweringX8632.h
+++ b/src/IceTargetLoweringX8632.h
@@ -23,10 +23,12 @@
#include "IceRegistersX8632.h"
#include "IceTargetLowering.h"
#include "IceTargetLoweringX8632Traits.h"
+#include "IceTargetLoweringX86Base.h"
namespace Ice {
-class TargetX8632 : public TargetLowering {
+class TargetX8632 final
+ : public ::Ice::X86Internal::TargetX86Base<TargetX8632> {
TargetX8632() = delete;
TargetX8632(const TargetX8632 &) = delete;
TargetX8632 &operator=(const TargetX8632 &) = delete;
@@ -34,13 +36,20 @@ class TargetX8632 : public TargetLowering {
public:
using X86InstructionSet = X8632::Traits::InstructionSet;
- static TargetX8632 *create(Cfg *Func);
- virtual X8632::Traits::Address
- stackVarToAsmOperand(const Variable *Var) const = 0;
- virtual X86InstructionSet getInstructionSet() const = 0;
+ static TargetX8632 *create(Cfg *Func) { return new TargetX8632(Func); }
protected:
- explicit TargetX8632(Cfg *Func) : TargetLowering(Func) {}
+ Operand *createNaClReadTPSrcOperand() {
+ Constant *Zero = Ctx->getConstantZero(IceType_i32);
+ return Traits::X86OperandMem::create(Func, IceType_i32, nullptr, Zero,
+ nullptr, 0,
+ Traits::X86OperandMem::SegReg_GS);
+ }
+
+private:
+ friend class ::Ice::X86Internal::TargetX86Base<TargetX8632>;
+
+ explicit TargetX8632(Cfg *Func) : TargetX86Base(Func) {}
};
class TargetDataX8632 final : public TargetDataLowering {
« no previous file with comments | « no previous file | src/IceTargetLoweringX8632.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698