Commit b2da3318 authored by Ng Zhi An's avatar Ng Zhi An Committed by Commit Bot

[wasm-simd][arm] Use unique register for src in shifts

In the codegen for shift operations, we update the temp s128 register
with the shift value, before shifting src with temp. Thus we really want
src to be a different register from temp.

I found this with some locally-ran fuzzing.

Bug: v8:10115
Change-Id: Ie492570c672f352f0e19aef2b8498c86ec4fdd98
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2107359Reviewed-by: 's avatarDeepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66756}
parent e05b10b7
......@@ -106,7 +106,7 @@ void VisitSimdShiftRRR(InstructionSelector* selector, ArchOpcode opcode,
} else {
InstructionOperand temps[] = {g.TempSimd128Register(), g.TempRegister()};
selector->Emit(opcode, g.DefineAsRegister(node),
g.UseRegister(node->InputAt(0)),
g.UseUniqueRegister(node->InputAt(0)),
g.UseRegister(node->InputAt(1)), arraysize(temps), temps);
}
}
......
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