Commit 2decee1b authored by Lei Zhang's avatar Lei Zhang Committed by Commit Bot

Fix MSVC warning in IA32 LiftoffAssembler::Load().

32-bit MSVC generates a C4018 warning for signed/unsigned mismatch.
Fix this by casting the std::numeric_limits<int32_t>::max() return
value.

Change-Id: Iaff6b81c797a88654a7d2fa6d910da105d824df8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2346934Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69321}
parent 1f330e39
...@@ -287,7 +287,7 @@ void LiftoffAssembler::Load(LiftoffRegister dst, Register src_addr, ...@@ -287,7 +287,7 @@ void LiftoffAssembler::Load(LiftoffRegister dst, Register src_addr,
Register offset_reg, uint32_t offset_imm, Register offset_reg, uint32_t offset_imm,
LoadType type, LiftoffRegList pinned, LoadType type, LiftoffRegList pinned,
uint32_t* protected_load_pc, bool is_load_mem) { uint32_t* protected_load_pc, bool is_load_mem) {
if (offset_imm > std::numeric_limits<int32_t>::max()) { if (offset_imm > static_cast<uint32_t>(std::numeric_limits<int32_t>::max())) {
// We do not generate code here, because such an offset should never pass // We do not generate code here, because such an offset should never pass
// the bounds check. However, the spec requires us to compile code with such // the bounds check. However, the spec requires us to compile code with such
// an offset. // an offset.
......
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