Skip to content

Commit cc2c902

Browse files
hashseedCommit bot
authored andcommitted
Encode RelocInfo extra tag to fit changed RelocInfo kind enum.
This fixes some failures on MIPS. Though not all of them, since MIPS does not correctly implement set_target_internal_reference. R=svenpanne@chromium.org Review URL: https://codereview.chromium.org/1008823002 Cr-Commit-Position: refs/heads/master@{#27183}
1 parent de8e2be commit cc2c902

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/assembler.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ void RelocInfoWriter::Write(const RelocInfo* rinfo) {
511511
: kVeneerPoolTag);
512512
} else {
513513
DCHECK(rmode > RelocInfo::LAST_COMPACT_ENUM);
514-
int saved_mode = rmode - RelocInfo::LAST_COMPACT_ENUM;
514+
int saved_mode = rmode - RelocInfo::LAST_COMPACT_ENUM - 1;
515515
// For all other modes we simply use the mode as the extra tag.
516516
// None of these modes need a data component.
517517
DCHECK(saved_mode < kPoolExtraTag);
@@ -721,7 +721,7 @@ void RelocIterator::next() {
721721
Advance(kIntSize);
722722
} else {
723723
AdvanceReadPC();
724-
int rmode = extra_tag + RelocInfo::LAST_COMPACT_ENUM;
724+
int rmode = extra_tag + RelocInfo::LAST_COMPACT_ENUM + 1;
725725
if (SetMode(static_cast<RelocInfo::Mode>(rmode))) return;
726726
}
727727
}

0 commit comments

Comments
 (0)