[mips64] Fix implicit conversion loses integer precision warning
Change-Id: Ic2bbf2b3ff542d916da43929445bd83553b5091f Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2401952 Reviewed-by: Georg Neis <neis@chromium.org> Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn> Cr-Commit-Position: refs/heads/master@{#69796}
This commit is contained in:
parent
830cc202a2
commit
d944544b46
@ -4378,13 +4378,13 @@ void TurboAssembler::BranchLong(Label* L, BranchDelaySlot bdslot) {
|
||||
} else {
|
||||
// Generate position independent long branch.
|
||||
BlockTrampolinePoolScope block_trampoline_pool(this);
|
||||
int64_t imm64;
|
||||
imm64 = branch_long_offset(L);
|
||||
int64_t imm64 = branch_long_offset(L);
|
||||
DCHECK(is_int32(imm64));
|
||||
int32_t imm32 = static_cast<int32_t>(imm64);
|
||||
or_(t8, ra, zero_reg);
|
||||
nal(); // Read PC into ra register.
|
||||
lui(t9, (imm64 & kHiMaskOf32) >> kLuiShift); // Branch delay slot.
|
||||
ori(t9, t9, (imm64 & kImm16Mask));
|
||||
lui(t9, (imm32 & kHiMaskOf32) >> kLuiShift); // Branch delay slot.
|
||||
ori(t9, t9, (imm32 & kImm16Mask));
|
||||
daddu(t9, ra, t9);
|
||||
if (bdslot == USE_DELAY_SLOT) {
|
||||
or_(ra, t8, zero_reg);
|
||||
@ -4402,12 +4402,12 @@ void TurboAssembler::BranchAndLinkLong(Label* L, BranchDelaySlot bdslot) {
|
||||
} else {
|
||||
// Generate position independent long branch and link.
|
||||
BlockTrampolinePoolScope block_trampoline_pool(this);
|
||||
int64_t imm64;
|
||||
imm64 = branch_long_offset(L);
|
||||
int64_t imm64 = branch_long_offset(L);
|
||||
DCHECK(is_int32(imm64));
|
||||
lui(t8, (imm64 & kHiMaskOf32) >> kLuiShift);
|
||||
int32_t imm32 = static_cast<int32_t>(imm64);
|
||||
lui(t8, (imm32 & kHiMaskOf32) >> kLuiShift);
|
||||
nal(); // Read PC into ra register.
|
||||
ori(t8, t8, (imm64 & kImm16Mask)); // Branch delay slot.
|
||||
ori(t8, t8, (imm32 & kImm16Mask)); // Branch delay slot.
|
||||
daddu(t8, ra, t8);
|
||||
jalr(t8);
|
||||
// Emit a nop in the branch delay slot if required.
|
||||
|
Loading…
Reference in New Issue
Block a user