diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2011-01-19 19:29:53 +0000 |
---|---|---|
committer | Aurelien Jarno <aurelien@aurel32.net> | 2011-01-26 14:30:24 +0100 |
commit | 0fad6efce5d3f18278b7239dece3c251b3e7c04d (patch) | |
tree | b6360af2081ccf0ac34999dc6e99d48f2c10394e /target-arm | |
parent | c6067f04c5bb40547f79b5c02b1cdef043b39c5f (diff) |
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>
Diffstat (limited to 'target-arm')
-rw-r--r-- | target-arm/translate.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/target-arm/translate.c b/target-arm/translate.c index 41cbb96ab0..d95133f725 100644 --- a/target-arm/translate.c +++ b/target-arm/translate.c @@ -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; } |