target/arm: Fix bugs in MVE VRMLALDAVH, VRMLSLDAVH
authorPeter Maydell <peter.maydell@linaro.org>
Mon, 28 Jun 2021 13:58:19 +0000 (14:58 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 2 Jul 2021 10:48:36 +0000 (11:48 +0100)
commit303db86fc73c68d8774203d4796b9995cc122886
tree8099b68b25de78ffe3de72533851a559caccb2f4
parentd59ccc30f64249d5727bc084e0f3cf4b2483117b
target/arm: Fix bugs in MVE VRMLALDAVH, VRMLSLDAVH

The initial implementation of the MVE VRMLALDAVH and VRMLSLDAVH
insns had some bugs:
 * the 32x32 multiply of elements was being done as 32x32->32,
   not 32x32->64
 * we were incorrectly maintaining the accumulator in its full
   72-bit form across all 4 beats of the insn; in the pseudocode
   it is squashed back into the 64 bits of the RdaHi:RdaLo
   registers after each beat

In particular, fixing the second of these allows us to recast
the implementation to avoid 128-bit arithmetic entirely.

Since the element size here is always 4, we can also drop the
parameterization of ESIZE to make the code a little more readable.

Suggested-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20210628135835.6690-3-peter.maydell@linaro.org
target/arm/mve_helper.c