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

Unified Diff: src/IceCfgNode.cpp

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: More code review changes 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 | « runtime/szrt_ll.ll ('k') | src/IceTargetLowering.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceCfgNode.cpp
diff --git a/src/IceCfgNode.cpp b/src/IceCfgNode.cpp
index c7a3d8164dbac270c6aab547970f4a6277afb81f..02b9aacb75f564ee48c0fe655c7c9ad7b0493e45 100644
--- a/src/IceCfgNode.cpp
+++ b/src/IceCfgNode.cpp
@@ -901,8 +901,9 @@ class BundleEmitHelper {
BundleEmitHelper &operator=(const BundleEmitHelper &) = delete;
public:
- BundleEmitHelper(Assembler *Asm, const InstList &Insts)
- : Asm(Asm), End(Insts.end()), BundleLockStart(End),
+ BundleEmitHelper(Assembler *Asm, TargetLowering *Target,
+ const InstList &Insts)
+ : Asm(Asm), Target(Target), End(Insts.end()), BundleLockStart(End),
BundleSize(1 << Asm->getBundleAlignLog2Bytes()),
BundleMaskLo(BundleSize - 1), BundleMaskHi(~BundleMaskLo),
SizeSnapshotPre(0), SizeSnapshotPost(0) {}
@@ -948,6 +949,7 @@ public:
BundleLockStart = I;
SizeSnapshotPre = Asm->getBufferSize();
Asm->setPreliminary(true);
+ Target->snapshotEmitState();
assert(isInBundleLockRegion());
}
// Update bookkeeping when the bundle_unlock instruction is
@@ -989,10 +991,12 @@ public:
assert(isInBundleLockRegion());
Asm->setBufferSize(SizeSnapshotPre);
Asm->setPreliminary(false);
+ Target->rollbackEmitState();
}
private:
Assembler *const Asm;
+ TargetLowering *const Target;
// End is a sentinel value such that BundleLockStart==End implies
// that we are not in a bundle_lock region.
const InstList::const_iterator End;
@@ -1047,7 +1051,7 @@ void CfgNode::emitIAS(Cfg *Func) const {
// of label bindings, label links, and relocation fixups. Instead,
// the first pass just disables all mutation of that state.
- BundleEmitHelper Helper(Asm, Insts);
+ BundleEmitHelper Helper(Asm, Func->getTarget(), Insts);
InstList::const_iterator End = Insts.end();
// Retrying indicates that we had to roll back to the bundle_lock
// instruction to apply padding before the bundle_lock sequence.
« no previous file with comments | « runtime/szrt_ll.ll ('k') | src/IceTargetLowering.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698