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

Unified Diff: lib/MC/MCObjectStreamer.cpp

Issue 1265823002: Auto-sandboxing: Don't expand instructions when in a bundle-locked group (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-llvm.git@master
Patch Set: Created 5 years, 5 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 | « lib/MC/MCAsmStreamer.cpp ('k') | test/MC/X86/nacl-test-recursive-expand.s » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/MC/MCObjectStreamer.cpp
diff --git a/lib/MC/MCObjectStreamer.cpp b/lib/MC/MCObjectStreamer.cpp
index b0a3d498a97c3403c68006ba4b41cbb27c1cda73..e8c31b365f5c73716bd8223d12f49270f5f83d79 100644
--- a/lib/MC/MCObjectStreamer.cpp
+++ b/lib/MC/MCObjectStreamer.cpp
@@ -213,7 +213,8 @@ void MCObjectStreamer::EmitInstruction(const MCInst &Inst,
const MCSubtargetInfo &STI) {
// @LOCALMOD-START
- if (NaClExpander && NaClExpander->expandInst(Inst, *this, STI))
+ MCSectionData *SD = getCurrentSectionData();
+ if (!SD->isBundleLocked() && NaClExpander && NaClExpander->expandInst(Inst, *this, STI))
return;
if (getAssembler().isBundlingEnabled() &&
@@ -224,7 +225,7 @@ void MCObjectStreamer::EmitInstruction(const MCInst &Inst,
MCStreamer::EmitInstruction(Inst, STI);
- MCSectionData *SD = getCurrentSectionData();
+
SD->setHasInstructions(true);
// Now that a machine instruction has been assembled into this section, make
« no previous file with comments | « lib/MC/MCAsmStreamer.cpp ('k') | test/MC/X86/nacl-test-recursive-expand.s » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698