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}
This commit is contained in:
yangguo 2015-03-13 06:39:18 -07:00 committed by Commit bot
parent de8e2be875
commit cc2c902fa5

View File

@ -511,7 +511,7 @@ void RelocInfoWriter::Write(const RelocInfo* rinfo) {
: kVeneerPoolTag);
} else {
DCHECK(rmode > RelocInfo::LAST_COMPACT_ENUM);
int saved_mode = rmode - RelocInfo::LAST_COMPACT_ENUM;
int saved_mode = rmode - RelocInfo::LAST_COMPACT_ENUM - 1;
// For all other modes we simply use the mode as the extra tag.
// None of these modes need a data component.
DCHECK(saved_mode < kPoolExtraTag);
@ -721,7 +721,7 @@ void RelocIterator::next() {
Advance(kIntSize);
} else {
AdvanceReadPC();
int rmode = extra_tag + RelocInfo::LAST_COMPACT_ENUM;
int rmode = extra_tag + RelocInfo::LAST_COMPACT_ENUM + 1;
if (SetMode(static_cast<RelocInfo::Mode>(rmode))) return;
}
}