Commit 132d2672 authored by Predrag Rudic's avatar Predrag Rudic Committed by Commit Bot

MIPS: Fix call RecordRelocInfo with mode NONE.

Calling RecordRelocInfo with NONE mode causes DCHECK in
ShouldRecordRelocInfo to fail.

Change-Id: I2525d3178c8f1f61cb6f58e7e257c206a94f0af0
Reviewed-on: https://chromium-review.googlesource.com/c/1283078Reviewed-by: 's avatarIvica Bogosavljevic <ibogosavljevic@wavecomp.com>
Commit-Queue: Ivica Bogosavljevic <ibogosavljevic@wavecomp.com>
Cr-Commit-Position: refs/heads/master@{#56724}
parent bd3ff7f9
......@@ -4141,7 +4141,9 @@ void Assembler::GenPCRelativeJump(Register tf, Register ts, int32_t imm32,
// or when changing imm32 that lui/ori pair loads.
or_(tf, ra, zero_reg);
nal(); // Relative place of nal instruction determines kLongBranchPCOffset.
RecordRelocInfo(rmode);
if (!RelocInfo::IsNone(rmode)) {
RecordRelocInfo(rmode);
}
lui(ts, (imm32 & kHiMask) >> kLuiShift);
ori(ts, ts, (imm32 & kImm16Mask));
addu(ts, ra, ts);
......@@ -4157,7 +4159,9 @@ void Assembler::GenPCRelativeJump(Register tf, Register ts, int32_t imm32,
void Assembler::GenPCRelativeJumpAndLink(Register t, int32_t imm32,
RelocInfo::Mode rmode,
BranchDelaySlot bdslot) {
RecordRelocInfo(rmode);
if (!RelocInfo::IsNone(rmode)) {
RecordRelocInfo(rmode);
}
// Order of these instructions is relied upon when patching them
// or when changing imm32 that lui/ori pair loads.
lui(t, (imm32 & kHiMask) >> kLuiShift);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment