From f06053e3c3933f75df9694aa3970d589f88b3543 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juha=20Riihim=C3=A4ki?= Date: Fri, 11 Feb 2011 13:35:25 +0000 Subject: target-arm: Correct conversion of Thumb Neon dp encodings into ARM MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We handle Thumb Neon data processing instructions by converting them into the equivalent ARM encoding, as the two are very close. However the ARM encoding should have bit 28 set, not clear. This wasn't causing any problems because we don't actually look at that bit during decode; however it is better to do the conversion correctly to avoid problems later if we add checks to UNDEF on SBZ/SBO bits. Signed-off-by: Juha Riihimäki Reviewed-by: Peter Maydell Signed-off-by: Aurelien Jarno --- target-arm/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'target-arm') diff --git a/target-arm/translate.c b/target-arm/translate.c index 83dc180545..f3488200e6 100644 --- a/target-arm/translate.c +++ b/target-arm/translate.c @@ -8015,7 +8015,7 @@ static int disas_thumb2_insn(CPUState *env, DisasContext *s, uint16_t insn_hw1) /* Coprocessor. */ if (((insn >> 24) & 3) == 3) { /* Translate into the equivalent ARM encoding. */ - insn = (insn & 0xe2ffffff) | ((insn & (1 << 28)) >> 4); + insn = (insn & 0xe2ffffff) | ((insn & (1 << 28)) >> 4) | (1 << 28); if (disas_neon_data_insn(env, s, insn)) goto illegal_op; } else { -- cgit v1.2.3