Received: from [140.186.70.92] (port=35767 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PrCBe-0002dB-1J for qemu-devel@nongnu.org; Sun, 20 Feb 2011 11:31:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PrCBc-0004nw-S0 for qemu-devel@nongnu.org; Sun, 20 Feb 2011 11:31:05 -0500 Received: from hall.aurel32.net ([88.191.126.93]:48656) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PrCBc-0004np-M5 for qemu-devel@nongnu.org; Sun, 20 Feb 2011 11:31:04 -0500 Date: Sun, 20 Feb 2011 17:31:00 +0100 From: Aurelien Jarno Subject: Re: [Qemu-devel] [PATCH] target-arm: Correct conversion of Thumb Neon dp encodings into ARM Message-ID: <20110220163100.GG18619@volta.aurel32.net> References: <1297431325-17371-1-git-send-email-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1297431325-17371-1-git-send-email-peter.maydell@linaro.org> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: qemu-devel@nongnu.org, patches@linaro.org On Fri, Feb 11, 2011 at 01:35:25PM +0000, Peter Maydell wrote: > From: Juha Riihimäki > > 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 > --- > target-arm/translate.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) Thanks, applied. > diff --git a/target-arm/translate.c b/target-arm/translate.c > index 3087a5d..793fd59 100644 > --- a/target-arm/translate.c > +++ b/target-arm/translate.c > @@ -8011,7 +8011,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 { > -- > 1.7.1 > > > -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net