Commit 6ee68916 authored by Pierre Langlois's avatar Pierre Langlois Committed by Commit Bot

[wasm-simd][arm64] Skip top 64-bit write in MOVI if identical.

The MOVI instruction writes an immediate into every lane of a vector. In
order to support all immediates, we split it into two 64-bit
writes. However if the top and bottom 64 bits are identical, we can skip
the second write.

Bug: v8:11033
Change-Id: Idfb74471de815d278a84c78d204d534d19214b2c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2507691Reviewed-by: 's avatarBill Budge <bbudge@chromium.org>
Reviewed-by: 's avatarZhi An Ng <zhin@chromium.org>
Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
Cr-Commit-Position: refs/heads/master@{#70987}
parent 1d0f4263
......@@ -503,13 +503,15 @@ void TurboAssembler::Movi(const VRegister& vd, uint64_t imm, Shift shift,
}
void TurboAssembler::Movi(const VRegister& vd, uint64_t hi, uint64_t lo) {
// TODO(all): Move 128-bit values in a more efficient way.
// TODO(v8:11033): Move 128-bit values in a more efficient way.
DCHECK(vd.Is128Bits());
UseScratchRegisterScope temps(this);
Movi(vd.V2D(), lo);
Register temp = temps.AcquireX();
Mov(temp, hi);
Ins(vd.V2D(), 1, temp);
if (lo != hi) {
UseScratchRegisterScope temps(this);
Register temp = temps.AcquireX();
Mov(temp, hi);
Ins(vd.V2D(), 1, temp);
}
}
void TurboAssembler::Mvn(const Register& rd, const Operand& operand) {
......
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