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

Unified Diff: src/IceInstX8632.h

Issue 463563006: Subzero: Randomly insert nops. (Closed) Base URL: https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Patch Set: Fix insertion strategy Created 6 years, 4 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/IceCfgNode.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 64ce4a0035f80ab1b0a1dad6cc3360359f28c861..834e061374b28acc6c4e679c079eea49153f0cd6 100644
--- a/src/IceInstX8632.h
+++ b/src/IceInstX8632.h
@@ -175,6 +175,7 @@ public:
Mulps,
Mulss,
Neg,
+ Nop,
Or,
Padd,
Pand,
@@ -1060,6 +1061,28 @@ private:
virtual ~InstX8632Movzx() {}
};
+// Nop instructions of varying length
+class InstX8632Nop : public InstX8632 {
+public:
+ // TODO: Replace with enum.
+ typedef unsigned NopVariant;
+
+ static InstX8632Nop *create(Cfg *Func, NopVariant Variant) {
+ return new (Func->allocate<InstX8632Nop>()) InstX8632Nop(Func, Variant);
+ }
+ virtual void emit(const Cfg *Func) const;
+ virtual void dump(const Cfg *Func) const;
+ static bool classof(const Inst *Inst) { return isClassof(Inst, Nop); }
+
+private:
+ InstX8632Nop(Cfg *Func, SizeT Length);
+ InstX8632Nop(const InstX8632Nop &) LLVM_DELETED_FUNCTION;
+ InstX8632Nop &operator=(const InstX8632Nop &) LLVM_DELETED_FUNCTION;
+ virtual ~InstX8632Nop() {}
+
+ NopVariant Variant;
+};
+
// Fld - load a value onto the x87 FP stack.
class InstX8632Fld : public InstX8632 {
public:
« no previous file with comments | « src/IceCfgNode.cpp ('k') | src/IceInstX8632.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698