aboutsummaryrefslogtreecommitdiff
path: root/target/s390x/tcg
diff options
context:
space:
mode:
authorIdo Plat <ido.plat@ibm.com>2024-03-18 21:27:10 +0100
committerThomas Huth <thuth@redhat.com>2024-03-25 15:05:59 +0100
commit272fba9779af0bb1c29cd30302fc1e31c59274d0 (patch)
treed1713484536e2aeb513f58d31ae7bb1c5d960e2e /target/s390x/tcg
parent66e411885a23c96ff73742d06b793fec3ceaebb7 (diff)
downloadqemu-272fba9779af0bb1c29cd30302fc1e31c59274d0.zip
qemu-272fba9779af0bb1c29cd30302fc1e31c59274d0.tar.gz
qemu-272fba9779af0bb1c29cd30302fc1e31c59274d0.tar.bz2
target/s390x: Use mutable temporary value for op_ts
Otherwise TCG would assume the register that holds t1 would be constant and reuse whenever it needs the value within it. Cc: qemu-stable@nongnu.org Fixes: f1ea739bd598 ("target/s390x: Use tcg_constant_* in local contexts") Reviewed-by: Ilya Leoshkevich <iii@linux.ibm.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> [iii: Adjust a newline and capitalization, add tags] Signed-off-by: Ido Plat <ido.plat@ibm.com> Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com> Reviewed-by: David Hildenbrand <david@redhat.com> Message-ID: <20240318202722.20675-1-iii@linux.ibm.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'target/s390x/tcg')
-rw-r--r--target/s390x/tcg/translate.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c
index 0d0c672..57b7db1 100644
--- a/target/s390x/tcg/translate.c
+++ b/target/s390x/tcg/translate.c
@@ -4781,9 +4781,10 @@ static DisasJumpType op_trXX(DisasContext *s, DisasOps *o)
static DisasJumpType op_ts(DisasContext *s, DisasOps *o)
{
- TCGv_i32 t1 = tcg_constant_i32(0xff);
+ TCGv_i32 ff = tcg_constant_i32(0xff);
+ TCGv_i32 t1 = tcg_temp_new_i32();
- tcg_gen_atomic_xchg_i32(t1, o->in2, t1, get_mem_index(s), MO_UB);
+ tcg_gen_atomic_xchg_i32(t1, o->in2, ff, get_mem_index(s), MO_UB);
tcg_gen_extract_i32(cc_op, t1, 7, 1);
set_cc_static(s);
return DISAS_NEXT;