]> git.ipfire.org Git - thirdparty/qemu.git/commit
target-arm: Avoid buffer overrun on UNPREDICTABLE ldrd/strd
authorPeter Maydell <peter.maydell@linaro.org>
Fri, 29 May 2015 10:29:00 +0000 (11:29 +0100)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 28 Jul 2015 23:23:18 +0000 (18:23 -0500)
commita4bb522ee51087af61998f290d12ba2e14c7910e
treeda40cd297f84f0a2ae869ab7f1ce407f452c0413
parentcf6c213981de2a54154b13fecee58e6cdc5aa504
target-arm: Avoid buffer overrun on UNPREDICTABLE ldrd/strd

A LDRD or STRD where rd is not an even number is UNPREDICTABLE.
We were letting this fall through, which is OK unless rd is 15,
in which case we would attempt to do a load_reg or store_reg
to a nonexistent r16 for the second half of the double-word.
Catch the odd-numbered-rd cases and UNDEF them instead.

To do this we rearrange the structure of the code a little
so we can put the UNDEF catches at the top before we've
allocated TCG temporaries.

Cc: qemu-stable@nongnu.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1431348973-21315-1-git-send-email-peter.maydell@linaro.org
(cherry picked from commit 3960c336ad96c2183549c8bf32bbff93ecda7ea4)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
target-arm/translate.c