Received: from eggs.gnu.org ([2001:4830:134:3::10]:52480) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bpvNV-00084g-4Q for qemu-devel@nongnu.org; Fri, 30 Sep 2016 06:49:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bpvNQ-0006qu-Ti for qemu-devel@nongnu.org; Fri, 30 Sep 2016 06:49:16 -0400 Date: Fri, 30 Sep 2016 12:49:09 +0200 From: "Edgar E. Iglesias" Message-ID: <20160930104909.GD9606@toto> References: <1475230780-8669-1-git-send-email-edgar.iglesias@gmail.com> <4496a78f-e527-fae4-0bc5-a9f1c0d5c997@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4496a78f-e527-fae4-0bc5-a9f1c0d5c997@redhat.com> Subject: Re: [Qemu-devel] [PATCH v1 1/1] target-arm: A64: Fix decoding of iss_sf in disas_ld_lit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Thomas Huth Cc: qemu-devel@nongnu.org, peter.maydell@linaro.org, edgar.iglesias@xilinx.com, qemu-arm@nongnu.org On Fri, Sep 30, 2016 at 12:42:27PM +0200, Thomas Huth wrote: > On 30.09.2016 12:19, Edgar E. Iglesias wrote: > > From: "Edgar E. Iglesias" > > > > Fix the decoding of iss_sf in disas_ld_lit. > > The SF (Sixty-Four) field in the ISS (Instruction Specific Syndrome) > > is a bit that specifies the width of the register that the > > instruction loads to. > > > > If cleared it specifies 32 bits. > > If set it specifies 64 bits. > > > > Signed-off-by: Edgar E. Iglesias > > --- > > target-arm/translate-a64.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/target-arm/translate-a64.c b/target-arm/translate-a64.c > > index ddf52f5..eae25c3 100644 > > --- a/target-arm/translate-a64.c > > +++ b/target-arm/translate-a64.c > > @@ -2025,7 +2025,7 @@ static void disas_ld_lit(DisasContext *s, uint32_t insn) > > do_fp_ld(s, rt, tcg_addr, size); > > } else { > > /* Only unsigned 32bit loads target 32bit registers. */ > > - bool iss_sf = opc == 0 ? 32 : 64; > > + bool iss_sf = opc == 0 ? false : true; > > You could simplify that to: > > bool iss_sf = !(opc == 0); I don't really see how that is simpler/clearer. I considered: bool iss_sf = opc != 0; but felt the expanded one was clearer in particular as a patch for review. In any case, I have no strong opinion on the syntax. Cheers, Edgar