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:
parent
686558dcff
commit
5345727935
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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(
|
||||
|
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user