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

Unified Diff: src/IceInstX86Base.h

Issue 1506653002: Subzero: Add Non-SFI support for x86-32. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fill in part of the lit test Created 5 years 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
Index: src/IceInstX86Base.h
diff --git a/src/IceInstX86Base.h b/src/IceInstX86Base.h
index 4c62a545c32ba2ce0e999a666ae8d17acd268f1b..7a7c51c19ba626d186bbdc72e66d128e729464df 100644
--- a/src/IceInstX86Base.h
+++ b/src/IceInstX86Base.h
@@ -67,6 +67,7 @@ public:
Divps,
Divss,
FakeRMW,
+ GetIP,
Fld,
Fstp,
Icmp,
@@ -240,6 +241,27 @@ private:
InstArithmetic::OpKind Op, Variable *Beacon);
};
+template <class Machine>
+class InstX86GetIP final : public InstX86Base<Machine> {
+ InstX86GetIP() = delete;
+ InstX86GetIP(const InstX86GetIP &) = delete;
+ InstX86GetIP &operator=(const InstX86GetIP &) = delete;
+
+public:
+ static InstX86GetIP *create(Cfg *Func, Variable *Dest) {
+ return new (Func->allocate<InstX86GetIP>()) InstX86GetIP(Func, Dest);
+ }
+ void emit(const Cfg *Func) const override;
+ void emitIAS(const Cfg *Func) const override;
+ void dump(const Cfg *Func) const override;
+ static bool classof(const Inst *Inst) {
+ return InstX86Base<Machine>::isClassof(Inst, InstX86Base<Machine>::GetIP);
+ }
+
+private:
+ InstX86GetIP(Cfg *Func, Variable *Dest);
+};
+
/// InstX86Label represents an intra-block label that is the target of an
/// intra-block branch. The offset between the label and the branch must be fit
/// into one byte (considered "near"). These are used for lowering i1

Powered by Google App Engine
This is Rietveld 408576698