Received: from eggs.gnu.org ([2001:4830:134:3::10]:37992) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UoaBo-0008Bt-9G for qemu-devel@nongnu.org; Mon, 17 Jun 2013 10:13:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UoaBl-0004Ly-IT for qemu-devel@nongnu.org; Mon, 17 Jun 2013 10:13:48 -0400 Received: from 46-65-204-42.zone16.bethere.co.uk ([46.65.204.42]:46592 helo=unicorn.mansr.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UoaBl-0004LY-As for qemu-devel@nongnu.org; Mon, 17 Jun 2013 10:13:45 -0400 From: =?iso-8859-1?Q?M=E5ns_Rullg=E5rd?= References: <1371474042-4956-1-git-send-email-mans@mansr.com> Date: Mon, 17 Jun 2013 15:13:43 +0100 In-Reply-To: (Peter Maydell's message of "Mon, 17 Jun 2013 15:10:02 +0100") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] target-arm: decode TBB/TBH more thoroughly List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Mans Rullgard , qemu-devel@nongnu.org Peter Maydell writes: > On 17 June 2013 14:00, Mans Rullgard wrote: >> This avoids other opcodes being incorrectly decoded as TBB/TBH. >> The LDA/STL instructions new in ARMv8 use this space. >> >> Signed-off-by: Mans Rullgard >> --- >> This was previously sent as part of the LDA/STL patch. Separating it >> seems clearer. >> --- >> target-arm/translate.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/target-arm/translate.c b/target-arm/translate.c >> index 3ffe7b8..bc41f7e 100644 >> --- a/target-arm/translate.c >> +++ b/target-arm/translate.c >> @@ -8126,7 +8126,7 @@ static int disas_thumb2_insn(CPUARMState *env, Dis= asContext *s, uint16_t insn_hw >> gen_store_exclusive(s, rd, rs, 15, addr, 2); >> } >> tcg_temp_free_i32(addr); >> - } else if ((insn & (1 << 6)) =3D=3D 0) { >> + } else if ((insn & (7 << 5)) =3D=3D 0) { >> /* Table Branch. */ >> if (rn =3D=3D 15) { >> addr =3D tcg_temp_new_i32(); > > The thing is that this change on its own is just shifting > the patterns that should UNDEF from the 'table branch' > arm of the elseif ladder into the 'load/store exclusive' > arm, and the latter doesn't (yet) have enough decode to > throw out the invalid cases. That's why I thought it made > more sense as part of the LDA/STL patch, because you > have to update the decode of the load/store excl arm of > the ladder anyway. > > If you want this as a separate patch then it should include > the necessary bits of decode in the ld/st excl arm to > cause the patterns to undef (then the lda/stl patch > can fill in extra cases in the switch() that this > patch would introduce.) You're quite right. Keeping that one line in the big patch is probably the simplest after all. --=20 M=E5ns Rullg=E5rd mans@mansr.com