Commit 9b666ea6 authored by Ng Zhi An's avatar Ng Zhi An Committed by Commit Bot

[wasm-simd][liftoff] Skip loads of high fp reg in simd pairs

When dst is a fp pair, we set both low and high fp regs. Later when we
look at set regs to determine which registers to load into, we examine
both low and high fp. This is wrong - we only need to look at the low
fp, since Fill will load into the correct fp pairs. The bug was
triggered because we were examining into junk values in register_loads
indexed by the high fp.

Fixed: v8:10307
Change-Id: I6cbc212a969090818a5da0fe3dab36a418c23d04
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2091632Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66632}
parent b8bfa85f
......@@ -214,6 +214,10 @@ class StackTransferRecipe {
RegisterLoad::HalfStack(stack_offset, kHighWord);
} else if (dst.is_fp_pair()) {
DCHECK_EQ(kWasmS128, type);
// load_dst_regs_.set above will set both low and high fp regs.
// But unlike gp_pair, we load a kWasm128 in one go in ExecuteLoads.
// So unset the top fp register to skip loading it.
load_dst_regs_.clear(dst.high());
*register_load(dst.low()) = RegisterLoad::Stack(stack_offset, type);
} else {
*register_load(dst) = RegisterLoad::Stack(stack_offset, type);
......
......@@ -648,9 +648,6 @@
# BUG(v8:9337).
'compiler/regress-9017': [SKIP],
# BUG(v8:10307).
'wasm/liftoff-simd-params': [SKIP],
# Slow tests.
'array-sort': [PASS, SLOW],
'compiler/osr-with-args': [PASS, SLOW],
......
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