提交 0fad6efc 编写于 作者: P Peter Maydell 提交者: Aurelien Jarno

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: NPeter Maydell <peter.maydell@linaro.org>
Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册