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

Unified Diff: src/IceInstX8632.h

Issue 944333002: Subzero: Update tests and build scripts for sandboxing. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Remove old assignment of llcbin and gold 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
Index: src/IceInstX8632.h
diff --git a/src/IceInstX8632.h b/src/IceInstX8632.h
index ed4924f135783200490d2421ca95122858775bf2..cfb2f66ce56adfb579c619c61dd39a89781a98ab 100644
--- a/src/IceInstX8632.h
+++ b/src/IceInstX8632.h
@@ -1031,6 +1031,26 @@ protected:
// with optimizations.
HasSideEffects = Locked;
}
+ // emitPrefix() and emitSuffix() are a workaround for an apparent
+ // llvm-mc bug in which "lock" is considered a separate instruction
+ // and may be placed in a different bundle from the instruction
+ // being locked, e.g.:
+ // 1e: lock nop
+ // 20: cmpxchg ...
jvoung (off chromium) 2015/02/23 17:58:36 Weird, I thought it would have been fixed by: htt
Jim Stichnoth 2015/02/23 21:38:19 Aha! The szbuild.py was running llvm-mc with just
+ // The workaround is to emit an explicit bundle_lock/bundle_unlock
+ // for instructions with a lock prefix.
+ void emitPrefix(Ostream &Str) const {
+ if (!ALLOW_DUMP)
+ return;
+ if (Locked)
+ Str << "\t.bundle_lock\n";
+ }
+ void emitSuffix(Ostream &Str) const {
+ if (!ALLOW_DUMP)
+ return;
+ if (Locked)
+ Str << "\n\t.bundle_unlock";
+ }
~InstX8632Lockable() override {}
};
« pydir/szbuild.py ('K') | « src/IceCfgNode.cpp ('k') | src/IceInstX8632.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698