mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
s390x: Fix stoc direction
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> Reviewed-by: Richard Henderson <rth@twiddle.net>
This commit is contained in:
parent
968bb75c34
commit
c095ed731c
1 changed files with 4 additions and 0 deletions
|
@ -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);
|
||||
|
||||
lab = gen_new_label();
|
||||
if (c.is_64) {
|
||||
tcg_gen_brcond_i64(c.cond, c.u.s64.a, c.u.s64.b, lab);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue