Subzero: Add sandboxing for x86-32.
BUG= https://code.google.com/p/nativeclient/issues/detail?id=4079
R=jvoung@chromium.org, kschimpf@google.com
Review URL: https://codereview.chromium.org/930733002
diff --git a/src/IceInst.cpp b/src/IceInst.cpp
index 3327455..ce5bde0 100644
--- a/src/IceInst.cpp
+++ b/src/IceInst.cpp
@@ -436,6 +436,13 @@
InstUnreachable::InstUnreachable(Cfg *Func)
: InstHighLevel(Func, Inst::Unreachable, 0, nullptr) {}
+InstBundleLock::InstBundleLock(Cfg *Func, InstBundleLock::Option BundleOption)
+ : InstHighLevel(Func, Inst::BundleLock, 0, nullptr),
+ BundleOption(BundleOption) {}
+
+InstBundleUnlock::InstBundleUnlock(Cfg *Func)
+ : InstHighLevel(Func, Inst::BundleUnlock, 0, nullptr) {}
+
InstFakeDef::InstFakeDef(Cfg *Func, Variable *Dest, Variable *Src)
: InstHighLevel(Func, Inst::FakeDef, Src ? 1 : 0, Dest) {
assert(Dest);
@@ -774,6 +781,48 @@
Str << "unreachable";
}
+void InstBundleLock::emit(const Cfg *Func) const {
+ if (!ALLOW_DUMP)
+ return;
+ Ostream &Str = Func->getContext()->getStrEmit();
+ Str << "\t.bundle_lock";
+ switch (BundleOption) {
+ case Opt_None:
+ break;
+ case Opt_AlignToEnd:
+ Str << "\talign_to_end";
+ break;
+ }
+}
+
+void InstBundleLock::dump(const Cfg *Func) const {
+ if (!ALLOW_DUMP)
+ return;
+ Ostream &Str = Func->getContext()->getStrDump();
+ Str << "bundle_lock";
+ switch (BundleOption) {
+ case Opt_None:
+ break;
+ case Opt_AlignToEnd:
+ Str << " align_to_end";
+ break;
+ }
+}
+
+void InstBundleUnlock::emit(const Cfg *Func) const {
+ if (!ALLOW_DUMP)
+ return;
+ Ostream &Str = Func->getContext()->getStrEmit();
+ Str << "\t.bundle_unlock";
+}
+
+void InstBundleUnlock::dump(const Cfg *Func) const {
+ if (!ALLOW_DUMP)
+ return;
+ Ostream &Str = Func->getContext()->getStrDump();
+ Str << "bundle_unlock";
+}
+
void InstFakeDef::emit(const Cfg *Func) const {
if (!ALLOW_DUMP)
return;