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

Unified Diff: src/IceInstX86Base.h

Issue 1438933002: Add a getTarget method that returns the x86 target lowering (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 5 years, 1 month 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/IceInstX86BaseImpl.h » ('j') | src/IceInstX86BaseImpl.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceInstX86Base.h
diff --git a/src/IceInstX86Base.h b/src/IceInstX86Base.h
index d18c746cac6eaa2aa7d3c264261be6048881a023..c19ec9d63e2c651a37834fa965fb9b4a34e8433a 100644
--- a/src/IceInstX86Base.h
+++ b/src/IceInstX86Base.h
@@ -35,6 +35,7 @@ template <class Machine> class InstX86Base : public InstTarget {
public:
using Traits = MachineTraits<Machine>;
+ using X86TargetLowering = typename Traits::TargetLowering;
enum InstKindX86 {
k__Start = Inst::Target,
@@ -156,6 +157,10 @@ public:
const Operand *Src,
const typename Traits::Assembler::GPREmitterShiftOp &Emitter);
+ static X86TargetLowering *getTarget(const Cfg* Func) {
+ return static_cast<X86TargetLowering *>(Func->getTarget());
+ }
+
protected:
InstX86Base<Machine>(Cfg *Func, InstKindX86 Kind, SizeT Maxsrcs,
Variable *Dest)
« no previous file with comments | « no previous file | src/IceInstX86BaseImpl.h » ('j') | src/IceInstX86BaseImpl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698