qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
To: Thomas Huth <thuth@redhat.com>
Cc: qemu-devel@nongnu.org, peter.maydell@linaro.org,
	edgar.iglesias@xilinx.com, qemu-arm@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v1 1/1] target-arm: A64: Fix decoding of iss_sf in disas_ld_lit
Date: Fri, 30 Sep 2016 12:49:09 +0200	[thread overview]
Message-ID: <20160930104909.GD9606@toto> (raw)
In-Reply-To: <4496a78f-e527-fae4-0bc5-a9f1c0d5c997@redhat.com>

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" <edgar.iglesias@xilinx.com>
> > 
> > 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 <edgar.iglesias@xilinx.com>
> > ---
> >  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

  reply	other threads:[~2016-09-30 10:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-30 10:19 [Qemu-devel] [PATCH v1 1/1] target-arm: A64: Fix decoding of iss_sf in disas_ld_lit Edgar E. Iglesias
2016-09-30 10:42 ` Thomas Huth
2016-09-30 10:49   ` Edgar E. Iglesias [this message]
2016-09-30 17:34     ` Peter Maydell
2016-09-30 18:36       ` Eric Blake
2016-09-30 21:42       ` Edgar Iglesias
2016-09-30 23:19         ` Peter Maydell
2016-10-01  1:15           ` Edgar Iglesias

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160930104909.GD9606@toto \
    --to=edgar.iglesias@gmail.com \
    --cc=edgar.iglesias@xilinx.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).