target-arm: fix SMMLA/SMMLS instructions
authorAurelien Jarno <aurelien@aurel32.net>
Thu, 6 Jan 2011 18:53:56 +0000 (19:53 +0100)
committerAurelien Jarno <aurelien@aurel32.net>
Thu, 6 Jan 2011 21:16:46 +0000 (22:16 +0100)
commit67b3a5d960bf381ee08ee33e7d4ccfdb3876254f
tree796ffecf8cb5e4cfbe90ee68870a7502c0ec2da6
parentee575dfd5efd79012cddd7c65874871ce633a220
target-arm: fix SMMLA/SMMLS instructions

SMMLA and SMMLS are broken on both in normal and thumb mode, that is
both (different) implementations are wrong. They try to avoid a 64-bit
add for the rounding, which is not trivial if you want to support both
SMMLA and SMMLS with the same code.

The code below uses the same implementation for both modes, using the
code from the ARM manual. It also fixes the thumb decoding that was a
mix between normal and thumb mode.

This fixes the issues reported in
https://bugs.launchpad.net/qemu/+bug/629298

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
target-arm/translate.c