[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] s390x: Fix stoc direction
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH] s390x: Fix stoc direction |
Date: |
Tue, 05 May 2015 16:41:30 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 |
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 <address@hidden>
> ---
> 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 <address@hidden>
r~
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Qemu-devel] [PATCH] s390x: Fix stoc direction,
Richard Henderson <=