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

Unified Diff: src/IceInst.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/IceCfgNode.cpp ('k') | src/IceInst.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceInst.h
diff --git a/src/IceInst.h b/src/IceInst.h
index 2d6d0548ef26c5d21fe1282c7dfadcf25f7d9956..72422c97b2e7af2ef2b0e8275b253888be0f35fa 100644
--- a/src/IceInst.h
+++ b/src/IceInst.h
@@ -59,11 +59,13 @@ public:
Select,
Store,
Switch,
- FakeDef, // not part of LLVM/PNaCl bitcode
- FakeUse, // not part of LLVM/PNaCl bitcode
- FakeKill, // not part of LLVM/PNaCl bitcode
- Target // target-specific low-level ICE
- // Anything >= Target is an InstTarget subclass.
+ BundleLock, // not part of LLVM/PNaCl bitcode
+ BundleUnlock, // not part of LLVM/PNaCl bitcode
+ FakeDef, // not part of LLVM/PNaCl bitcode
+ FakeUse, // not part of LLVM/PNaCl bitcode
+ FakeKill, // not part of LLVM/PNaCl bitcode
+ Target // target-specific low-level ICE
+ // Anything >= Target is an InstTarget subclass.
};
InstKind getKind() const { return Kind; }
@@ -743,6 +745,53 @@ private:
~InstUnreachable() override {}
};
+// BundleLock instruction. There are no operands. Contains an option
+// indicating whether align_to_end is specified.
+class InstBundleLock : public InstHighLevel {
+ InstBundleLock(const InstBundleLock &) = delete;
+ InstBundleLock &operator=(const InstBundleLock &) = delete;
+
+public:
+ enum Option { Opt_None, Opt_AlignToEnd };
+ static InstBundleLock *create(Cfg *Func, Option BundleOption) {
+ return new (Func->allocate<InstBundleLock>())
+ InstBundleLock(Func, BundleOption);
+ }
+ void emit(const Cfg *Func) const override;
+ void emitIAS(const Cfg * /* Func */) const override {}
+ void dump(const Cfg *Func) const override;
+ Option getOption() const { return BundleOption; }
+ static bool classof(const Inst *Inst) {
+ return Inst->getKind() == BundleLock;
+ }
+
+private:
+ Option BundleOption;
+ InstBundleLock(Cfg *Func, Option BundleOption);
+ ~InstBundleLock() override {}
+};
+
+// BundleUnlock instruction. There are no operands.
+class InstBundleUnlock : public InstHighLevel {
+ InstBundleUnlock(const InstBundleUnlock &) = delete;
+ InstBundleUnlock &operator=(const InstBundleUnlock &) = delete;
+
+public:
+ static InstBundleUnlock *create(Cfg *Func) {
+ return new (Func->allocate<InstBundleUnlock>()) InstBundleUnlock(Func);
+ }
+ 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 Inst->getKind() == BundleUnlock;
+ }
+
+private:
+ explicit InstBundleUnlock(Cfg *Func);
+ ~InstBundleUnlock() override {}
+};
+
// FakeDef instruction. This creates a fake definition of a variable,
// which is how we represent the case when an instruction produces
// multiple results. This doesn't happen with high-level ICE
« no previous file with comments | « src/IceCfgNode.cpp ('k') | src/IceInst.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698