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

Unified Diff: src/IceInstX8632.h

Issue 930733002: Subzero: Add sandboxing for x86-32. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Add a sandboxing test. Rebase. Created 5 years, 10 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 | « src/IceInst.cpp ('k') | src/IceInstX8632.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceInstX8632.h
diff --git a/src/IceInstX8632.h b/src/IceInstX8632.h
index 7725ad72a43c9b3dd71154bebb13e767d9a407c6..ed4924f135783200490d2421ca95122858775bf2 100644
--- a/src/IceInstX8632.h
+++ b/src/IceInstX8632.h
@@ -196,6 +196,7 @@ public:
Idiv,
Imul,
Insertps,
+ Jmp,
Label,
Lea,
Load,
@@ -400,6 +401,27 @@ private:
const InstX8632Label *Label; // Intra-block branch target
};
+// Jump to a target outside this function, such as tailcall, nacljump,
+// naclret, unreachable. This is different from a Branch instruction
+// in that there is no intra-function control flow to represent.
+class InstX8632Jmp : public InstX8632 {
+ InstX8632Jmp(const InstX8632Jmp &) = delete;
+ InstX8632Jmp &operator=(const InstX8632Jmp &) = delete;
+
+public:
+ static InstX8632Jmp *create(Cfg *Func, Operand *Target) {
+ return new (Func->allocate<InstX8632Jmp>()) InstX8632Jmp(Func, Target);
+ }
+ Operand *getJmpTarget() const { return getSrc(0); }
+ 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 isClassof(Inst, Jmp); }
+
+private:
+ InstX8632Jmp(Cfg *Func, Operand *Target);
+};
+
// AdjustStack instruction - subtracts esp by the given amount and
// updates the stack offset during code emission.
class InstX8632AdjustStack : public InstX8632 {
« no previous file with comments | « src/IceInst.cpp ('k') | src/IceInstX8632.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698