Commit 0fad6efc authored by Peter Maydell's avatar Peter Maydell Committed by Aurelien Jarno
Browse files

target-arm: Fix loading of scalar value for Neon multiply-by-scalar



Fix the register and part of register we get the scalar from in
the various "multiply vector by scalar" ops (VMUL by scalar
and friends).
Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
Signed-off-by: default avatarAurelien Jarno <aurelien@aurel32.net>
parent c6067f04
......@@ -3608,14 +3608,14 @@ static inline TCGv neon_get_scalar(int size, int reg)
{
TCGv tmp;
if (size == 1) {
tmp = neon_load_reg(reg >> 1, reg & 1);
} else {
tmp = neon_load_reg(reg >> 2, (reg >> 1) & 1);
if (reg & 1) {
gen_neon_dup_low16(tmp);
} else {
tmp = neon_load_reg(reg & 7, reg >> 4);
if (reg & 8) {
gen_neon_dup_high16(tmp);
} else {
gen_neon_dup_low16(tmp);
}
} else {
tmp = neon_load_reg(reg & 15, reg >> 4);
}
return tmp;
}
......
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