[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 06/10 4/4] target/s390x: Use deposit to set cc_op in save_link
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v2 06/10 4/4] target/s390x: Use deposit to set cc_op in save_link_info |
Date: |
Tue, 10 Sep 2024 01:19:10 +0200 |
From: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20240605215739.4758-7-richard.henderson@linaro.org>
[PMD: Split patch, part 4/4]
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
target/s390x/tcg/translate.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c
index bfb7662329..b9fdfdc85a 100644
--- a/target/s390x/tcg/translate.c
+++ b/target/s390x/tcg/translate.c
@@ -1433,11 +1433,13 @@ static void save_link_info(DisasContext *s, DisasOps *o)
tcg_gen_shri_i64(t1, psw_mask, 16);
/* Deposit pc to replace garbage bits below program mask. */
gen_psw_addr_disp(s, t2, s->ilen);
- tcg_gen_deposit_i64(o->out, t1, t2, 0, 24);
+ tcg_gen_deposit_i64(t1, t1, t2, 0, 24);
+ /*
+ * Deposit cc to replace garbage bits above program mask.
+ * Note that cc is in [0-3], thus [63:30] are set to zero.
+ */
tcg_gen_extu_i32_i64(t2, cc_op);
- tcg_gen_shli_i64(t2, t2, 28);
- tcg_gen_or_i64(o->out, o->out, t2);
-
+ tcg_gen_deposit_i64(t1, t1, t2, 28, 64 - 28);
/* Install ilen. */
tcg_gen_ori_i64(t1, t1, (s->ilen / 2) << 30);
--
2.45.2
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH v2 06/10 4/4] target/s390x: Use deposit to set cc_op in save_link_info,
Philippe Mathieu-Daudé <=