Commit 1e7fcea8 authored by Lei Zhang's avatar Lei Zhang Committed by V8 LUCI CQ

Avoid MSVC narrowing conversion warning in liftoff-assembler-ia32.h.

The line being modified currently causes a 32-bit build with MSVC to
give out this warning:

C2397: conversion from 'int32_t' to 'v8::internal::byte' requires a
narrowing conversion.

Avoid the warning by declaring `shift` as type byte to start with.

Change-Id: Ib11c8e24811bfc6fe076b845be140e86b7ca38c5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2877949Reviewed-by: 's avatarZhi An Ng <zhin@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74451}
parent 4a19c62f
......@@ -3890,13 +3890,13 @@ void LiftoffAssembler::emit_i64x2_shr_s(LiftoffRegister dst,
void LiftoffAssembler::emit_i64x2_shri_s(LiftoffRegister dst,
LiftoffRegister lhs, int32_t rhs) {
XMMRegister tmp = liftoff::kScratchDoubleReg;
int32_t shift = rhs & 63;
byte shift = rhs & 63;
// Set up a mask [0x80000000,0,0x80000000,0].
Pcmpeqb(tmp, tmp);
Psllq(tmp, tmp, byte{63});
Psrlq(tmp, tmp, byte{shift});
Psrlq(tmp, tmp, shift);
liftoff::EmitSimdShiftOpImm<&Assembler::vpsrlq, &Assembler::psrlq, 6>(
this, dst, lhs, rhs);
Pxor(dst.fp(), tmp);
......
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