mirror of https://gitee.com/openkylin/qemu.git
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: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
This commit is contained in:
parent
c6067f04c5
commit
0fad6efce5
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue