[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 03/42] target/cris: Finish conversion to tcg_gen_qemu_{ld, st}_*
|
From: |
Richard Henderson |
|
Subject: |
[PULL 03/42] target/cris: Finish conversion to tcg_gen_qemu_{ld, st}_* |
|
Date: |
Fri, 5 May 2023 22:24:08 +0100 |
Convert away from the old interface with the implicit
MemOp argument. In this case we can fold the calls
using the size bits of MemOp.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Anton Johansson <anjo@rev.ng>
Message-Id: <20230502135741.1158035-3-richard.henderson@linaro.org>
---
target/cris/translate_v10.c.inc | 18 ++++--------------
1 file changed, 4 insertions(+), 14 deletions(-)
diff --git a/target/cris/translate_v10.c.inc b/target/cris/translate_v10.c.inc
index 32338bb69b..b7b0517982 100644
--- a/target/cris/translate_v10.c.inc
+++ b/target/cris/translate_v10.c.inc
@@ -80,13 +80,9 @@ static void gen_store_v10_conditional(DisasContext *dc, TCGv
addr, TCGv val,
/* Store only if F flag isn't set */
tcg_gen_andi_tl(t1, cpu_PR[PR_CCS], F_FLAG_V10);
tcg_gen_brcondi_tl(TCG_COND_NE, t1, 0, l1);
- if (size == 1) {
- tcg_gen_qemu_st8(tval, taddr, mem_index);
- } else if (size == 2) {
- tcg_gen_qemu_st16(tval, taddr, mem_index);
- } else {
- tcg_gen_qemu_st32(tval, taddr, mem_index);
- }
+
+ tcg_gen_qemu_st_tl(tval, taddr, mem_index, ctz32(size) | MO_TE);
+
gen_set_label(l1);
tcg_gen_shri_tl(t1, t1, 1); /* shift F to P position */
tcg_gen_or_tl(cpu_PR[PR_CCS], cpu_PR[PR_CCS], t1); /*P=F*/
@@ -109,13 +105,7 @@ static void gen_store_v10(DisasContext *dc, TCGv addr,
TCGv val,
return;
}
- if (size == 1) {
- tcg_gen_qemu_st8(val, addr, mem_index);
- } else if (size == 2) {
- tcg_gen_qemu_st16(val, addr, mem_index);
- } else {
- tcg_gen_qemu_st32(val, addr, mem_index);
- }
+ tcg_gen_qemu_st_tl(val, addr, mem_index, ctz32(size) | MO_TE);
}
--
2.34.1
- [PULL 00/42] tcg patch queue, Richard Henderson, 2023/05/05
- [PULL 01/42] softfloat: Fix the incorrect computation in float32_exp2, Richard Henderson, 2023/05/05
- [PULL 02/42] target/avr: Finish conversion to tcg_gen_qemu_{ld,st}_*, Richard Henderson, 2023/05/05
- [PULL 03/42] target/cris: Finish conversion to tcg_gen_qemu_{ld, st}_*,
Richard Henderson <=
- [PULL 06/42] target/mips: Finish conversion to tcg_gen_qemu_{ld, st}_*, Richard Henderson, 2023/05/05
- [PULL 04/42] target/Hexagon: Finish conversion to tcg_gen_qemu_{ld, st}_*, Richard Henderson, 2023/05/05
- [PULL 05/42] target/m68k: Finish conversion to tcg_gen_qemu_{ld, st}_*, Richard Henderson, 2023/05/05
- [PULL 14/42] target/hppa: Use MO_ALIGN for system UNALIGN(), Richard Henderson, 2023/05/05
- [PULL 07/42] target/s390x: Finish conversion to tcg_gen_qemu_{ld, st}_*, Richard Henderson, 2023/05/05
- [PULL 16/42] target/sparc: Use MO_ALIGN where required, Richard Henderson, 2023/05/05
- [PULL 15/42] target/hppa: Remove TARGET_ALIGNED_ONLY, Richard Henderson, 2023/05/05
- [PULL 11/42] target/alpha: Use MO_ALIGN for system UNALIGN(), Richard Henderson, 2023/05/05