Chromium Code Reviews| Index: src/IceAssembler.cpp |
| diff --git a/src/IceAssembler.cpp b/src/IceAssembler.cpp |
| index 04cb949b915500427e4af2841b198b6d60b8ecff..273c42842b4d59c5d2fb53ce655954e39899b6cb 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 (hygrid iasm mode). |
|
Jim Stichnoth
2015/12/08 23:06:44
hybrid
|
| + 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); |