MIPS: Fix unbounded label counter.

TEST=mjsunit/asm/embenchen/zlib
BUG=

Review-Url: https://codereview.chromium.org/1925543003
Cr-Commit-Position: refs/heads/master@{#35854}
This commit is contained in:
balazs.kilvady 2016-04-28 03:58:41 -07:00 committed by Commit bot
parent 686558dcff
commit 5345727935
6 changed files with 10 additions and 0 deletions

View File

@ -2959,6 +2959,7 @@ void Assembler::dd(Label* label) {
data = reinterpret_cast<uint32_t>(buffer_ + label->pos());
} else {
data = jump_address(label);
unbound_labels_count_++;
internal_reference_positions_.insert(label->pos());
}
RecordRelocInfo(RelocInfo::INTERNAL_REFERENCE);

View File

@ -1161,6 +1161,8 @@ class Assembler : public AssemblerBase {
bool IsPrevInstrCompactBranch() { return prev_instr_compact_branch_; }
inline int UnboundLabelsCount() { return unbound_labels_count_; }
protected:
// Load Scaled Address instruction.
void lsa(Register rd, Register rt, Register rs, uint8_t sa);

View File

@ -3212,6 +3212,7 @@ void Assembler::dd(Label* label) {
data = reinterpret_cast<uint64_t>(buffer_ + label->pos());
} else {
data = jump_address(label);
unbound_labels_count_++;
internal_reference_positions_.insert(label->pos());
}
RecordRelocInfo(RelocInfo::INTERNAL_REFERENCE);

View File

@ -1215,6 +1215,8 @@ class Assembler : public AssemblerBase {
bool IsPrevInstrCompactBranch() { return prev_instr_compact_branch_; }
inline int UnboundLabelsCount() { return unbound_labels_count_; }
protected:
// Load Scaled Address instructions.
void lsa(Register rd, Register rt, Register rs, uint8_t sa);

View File

@ -3191,6 +3191,8 @@ TEST(jump_tables1) {
__ jr(ra);
__ nop();
CHECK_EQ(assm.UnboundLabelsCount(), 0);
CodeDesc desc;
assm.GetCode(&desc);
Handle<Code> code = isolate->factory()->NewCode(

View File

@ -3315,6 +3315,8 @@ TEST(jump_tables1) {
__ jr(ra);
__ nop();
CHECK_EQ(assm.UnboundLabelsCount(), 0);
CodeDesc desc;
assm.GetCode(&desc);
Handle<Code> code = isolate->factory()->NewCode(