Index: src/mips/assembler-mips.cc |
diff --git a/src/mips/assembler-mips.cc b/src/mips/assembler-mips.cc |
index 865e64c87d26fabb81a7511d774d1fb9b8440c60..0501156f5e3a50a9e02f89d65ad150a50e2a8d0a 100644 |
--- a/src/mips/assembler-mips.cc |
+++ b/src/mips/assembler-mips.cc |
@@ -895,8 +895,7 @@ void Assembler::print(Label* L) { |
} else { |
PrintF("%d\n", instr); |
} |
- next(&l, internal_reference_positions_.find(l.pos()) != |
- internal_reference_positions_.end()); |
+ next(&l, is_internal_reference(&l)); |
} |
} else { |
PrintF("label in inconsistent state (pos = %d)\n", L->pos_); |
@@ -910,14 +909,15 @@ void Assembler::bind_to(Label* L, int pos) { |
bool is_internal = false; |
if (L->is_linked() && !trampoline_emitted_) { |
unbound_labels_count_--; |
- next_buffer_check_ += kTrampolineSlotsSize; |
+ if (!is_internal_reference(L)) { |
+ next_buffer_check_ += kTrampolineSlotsSize; |
+ } |
} |
while (L->is_linked()) { |
int32_t fixup_pos = L->pos(); |
int32_t dist = pos - fixup_pos; |
- is_internal = internal_reference_positions_.find(fixup_pos) != |
- internal_reference_positions_.end(); |
+ is_internal = is_internal_reference(L); |
next(L, is_internal); // Call next before overwriting link with target at |
// fixup_pos. |
Instr instr = instr_at(fixup_pos); |
@@ -934,7 +934,6 @@ void Assembler::bind_to(Label* L, int pos) { |
CHECK((trampoline_pos - fixup_pos) <= branch_offset); |
target_at_put(fixup_pos, trampoline_pos, false); |
fixup_pos = trampoline_pos; |
- dist = pos - fixup_pos; |
} |
target_at_put(fixup_pos, pos, false); |
} else { |