target-arm: Fix UNDEF cases in Thumb load/store
authorPeter Maydell <peter.maydell@linaro.org>
Thu, 10 Mar 2011 16:48:49 +0000 (16:48 +0000)
committerAurelien Jarno <aurelien@aurel32.net>
Tue, 22 Mar 2011 06:52:35 +0000 (07:52 +0100)
commitac0a32b02593b4b502fbf11d748f3541511d41fc
treec40d15681c1e8d51a5f2979438b1e1b6f9acbefc
parentc5830a60c43438082f36fb37addb0e7a79c5e8b5
target-arm: Fix UNDEF cases in Thumb load/store

Decode of Thumb load/store was merging together the cases of 'bit 11==0'
(reg+reg LSL imm) and 'bit 11==1' (reg+imm). This happens to work for
valid instruction patterns but meant that we would not UNDEF for the
cases the architecture mandates that we must. Make the decode actually
look at bit 11 as well as [10..8] so that we UNDEF in the right places.

This change also removes what was a spurious unreachable 'case 8',
and correctly frees TCG temporaries on the illegal-insn codepaths.

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