Skip to content

Commit

Permalink
target/s390x: Fix LAE setting a wrong access register
Browse files Browse the repository at this point in the history
LAE should set the access register corresponding to the first operand,
instead, it always modifies access register 1.

Co-developed-by: Ido Plat <Ido.Plat@ibm.com>
Cc: qemu-stable@nongnu.org
Fixes: a1c7610 ("target-s390x: implement LAY and LAEY instructions")
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Message-ID: <20240111092328.929421-2-iii@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
  • Loading branch information
iii-i authored and huth committed Jan 11, 2024
1 parent e072af1 commit e358a25
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion target/s390x/tcg/translate.c
Original file line number Diff line number Diff line change
Expand Up @@ -3221,6 +3221,7 @@ static DisasJumpType op_mov2e(DisasContext *s, DisasOps *o)
{
int b2 = get_field(s, b2);
TCGv ar1 = tcg_temp_new_i64();
int r1 = get_field(s, r1);

o->out = o->in2;
o->in2 = NULL;
Expand All @@ -3244,7 +3245,7 @@ static DisasJumpType op_mov2e(DisasContext *s, DisasOps *o)
break;
}

tcg_gen_st32_i64(ar1, tcg_env, offsetof(CPUS390XState, aregs[1]));
tcg_gen_st32_i64(ar1, tcg_env, offsetof(CPUS390XState, aregs[r1]));
return DISAS_NEXT;
}

Expand Down

0 comments on commit e358a25

Please sign in to comment.