]> git.ipfire.org Git - thirdparty/qemu.git/commit
target/arm: Fix sign-extension in sve do_ldr/do_str
authorRichard Henderson <richard.henderson@linaro.org>
Thu, 16 Aug 2018 13:05:27 +0000 (14:05 +0100)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 19 Mar 2019 02:02:34 +0000 (21:02 -0500)
commitca276173c9e499731839c4aea604bb9102cfe3c6
treec1d6c8e6581f7448e85e6f1442b7146eb81776d0
parent471b5ae0112c07ec5abe3109645f7e73a23614a3
target/arm: Fix sign-extension in sve do_ldr/do_str

The expression (int) imm + (uint32_t) len_align turns into uint32_t
and thus with negative imm produces a memory operation at the wrong
offset.  None of the numbers involved are particularly large, so
change everything to use int.

Cc: qemu-stable@nongnu.org (3.0.1)
Reported-by: Laurent Desnogues <laurent.desnogues@gmail.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
(cherry picked from commit 19f2acc915a0f8f443a959844540a6f09133cc96)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
target/arm/translate-sve.c