qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <rth@twiddle.net>
To: Alexander Graf <agraf@suse.de>, qemu-devel@nongnu.org
Cc: afaerber@suse.de
Subject: Re: [Qemu-devel] [PATCH] s390x: Fix stoc direction
Date: Tue, 05 May 2015 16:41:30 -0700	[thread overview]
Message-ID: <5549552A.40600@twiddle.net> (raw)
In-Reply-To: <1429062341-59863-1-git-send-email-agraf@suse.de>

On 04/14/2015 06:45 PM, Alexander Graf wrote:
> The store conditional instruction wants to store when the condition
> is fulfilled, so we should branch out when it's not true.
> 
> The code today branches out when the condition is true, clearly
> reversing the logic. Fix it up by negating the condition.
> 
> Signed-off-by: Alexander Graf <agraf@suse.de>
> ---
>  target-s390x/translate.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/target-s390x/translate.c b/target-s390x/translate.c
> index 4f82edd..8ae4912 100644
> --- a/target-s390x/translate.c
> +++ b/target-s390x/translate.c
> @@ -3082,6 +3082,10 @@ static ExitStatus op_soc(DisasContext *s, DisasOps *o)
>  
>      disas_jcc(s, &c, get_field(s->fields, m3));
>  
> +    /* We want to store when the condition is fulfilled, so branch
> +       out when it's not */
> +    c.cond = tcg_invert_cond(c.cond);

Doh.

Reviewed-by: Richard Henderson <rth@twiddle.net>


r~

      reply	other threads:[~2015-05-05 23:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-15  1:45 [Qemu-devel] [PATCH] s390x: Fix stoc direction Alexander Graf
2015-05-05 23:41 ` Richard Henderson [this message]

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=5549552A.40600@twiddle.net \
    --to=rth@twiddle.net \
    --cc=afaerber@suse.de \
    --cc=agraf@suse.de \
    --cc=qemu-devel@nongnu.org \
    /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).