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

Unified Diff: src/IceAssembler.cpp

Issue 1511653002: Fix problems with sandboxing and the ARM integrated assembler. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix nit. Created 5 years 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/IceAssembler.h ('k') | src/IceAssemblerARM32.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceAssembler.cpp
diff --git a/src/IceAssembler.cpp b/src/IceAssembler.cpp
index 04cb949b915500427e4af2841b198b6d60b8ecff..44c4ee20c15a2f3518df85a95feecabd041eefed 100644
--- a/src/IceAssembler.cpp
+++ b/src/IceAssembler.cpp
@@ -35,6 +35,17 @@ static uintptr_t NewContents(Assembler &Assemblr, intptr_t Capacity) {
return Result;
}
+void Label::linkTo(const Assembler &Asm, intptr_t Pos) {
+ // We must not set the link until the position is absolutely known. This means
+ // not during the preliminary (sandboxing) pass, and not when the instruction
+ // needs a text fixup (hybrid iasm mode).
+ if (Asm.getPreliminary() || Asm.needsTextFixup())
+ return;
+ assert(!isBound());
+ Position = Pos + kWordSize;
+ assert(isLinked());
+}
+
void AssemblerBuffer::installFixup(AssemblerFixup *F) {
if (!Assemblr.getPreliminary())
Fixups.push_back(F);
« no previous file with comments | « src/IceAssembler.h ('k') | src/IceAssemblerARM32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698