qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] target/s390x: Use mutable temporary value for op_ts
@ 2024-03-18 16:26 Ilya Leoshkevich
  2024-03-18 16:26 ` [PATCH 2/2] tests/tcg/s390x: Test TEST AND SET Ilya Leoshkevich
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Ilya Leoshkevich @ 2024-03-18 16:26 UTC (permalink / raw)
  To: Richard Henderson, David Hildenbrand, Thomas Huth
  Cc: qemu-s390x, qemu-devel, Ido Plat, Ilya Leoshkevich

From: Ido Plat <ido.plat@ibm.com>

Otherwise TCG would assume the register that holds t1 would be constant
and reuse whenever it needs the value within it.

Reviewed-by: Ilya Leoshkevich <iii@linux.ibm.com>
[iii: Adjust a newline and capitalization]
Signed-off-by: Ido Plat <ido.plat@ibm.com>
---
 target/s390x/tcg/translate.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c
index 0d0c672c959..3fdddac7684 100644
--- a/target/s390x/tcg/translate.c
+++ b/target/s390x/tcg/translate.c
@@ -4781,8 +4781,9 @@ 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 t1 = tcg_temp_new_i32();
 
+    tcg_gen_movi_i32(t1, 0xff);
     tcg_gen_atomic_xchg_i32(t1, o->in2, t1, get_mem_index(s), MO_UB);
     tcg_gen_extract_i32(cc_op, t1, 7, 1);
     set_cc_static(s);
-- 
2.44.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-03-18 17:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-18 16:26 [PATCH 1/2] target/s390x: Use mutable temporary value for op_ts Ilya Leoshkevich
2024-03-18 16:26 ` [PATCH 2/2] tests/tcg/s390x: Test TEST AND SET Ilya Leoshkevich
2024-03-18 16:33 ` [PATCH 1/2] target/s390x: Use mutable temporary value for op_ts Thomas Huth
2024-03-18 17:32 ` Richard Henderson

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).