Commit cc49f4fe authored by Thibaud Michaud's avatar Thibaud Michaud Committed by Commit Bot

[liftoff] Fix float stability issue on arm simulator

On intel platforms, floats do not always have a stable bit pattern.
To preserve the bit pattern of float immediates, we should keep them
in an int using get_bits() instead of casting them to a float with
get_scalar().

R=ahaas@chromium.org
CC=​zhin@chromium.org

Change-Id: I481219f755c40cbba760be5744734c1075e8ab66
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2172694
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67560}
parent 61c2a0f4
......@@ -355,7 +355,7 @@ void LiftoffAssembler::LoadConstant(LiftoffRegister reg, WasmValue value,
break;
case ValueType::kF64: {
Register extra_scratch = GetUnusedRegister(kGpReg).gp();
vmov(reg.fp(), Double(value.to_f64_boxed().get_scalar()), extra_scratch);
vmov(reg.fp(), Double(value.to_f64_boxed().get_bits()), extra_scratch);
break;
}
default:
......
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