target-tricore: fix msub32_suov return wrong results
authorBastian Koppelmann <kbastian@mail.uni-paderborn.de>
Wed, 28 Jan 2015 12:15:05 +0000 (12:15 +0000)
committerBastian Koppelmann <kbastian@mail.uni-paderborn.de>
Tue, 3 Mar 2015 01:04:53 +0000 (01:04 +0000)
commit3debbb5af5f63440b170b71bf3aecc0e778f5691
treebf7c6c553a6550f9e4f8f06b182cff0509d56b7b
parentf0cab01b6c9bb9c2f5085837ca86d70d144cca9d
target-tricore: fix msub32_suov return wrong results

If the signed result of the multiplication overflows, we would get a negative
value, which would result in a addition instead of a subtraction.

Now we do the overflow calculation and saturation by hand instead of using
suov32_neg.

Signed-off-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
Reviewed-by: Richard Henderson <rth@twiddle.net>
target-tricore/op_helper.c