[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 03/13] target/mips: Rename gen_move_low32() -> gen_move_low32_tl(
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 03/13] target/mips: Rename gen_move_low32() -> gen_move_low32_tl() |
Date: |
Tue, 26 Nov 2024 14:15:35 +0100 |
MIPS gen_move_low32() takes a target-specific TCGv argument.
Rename it as gen_move_low32_tl() to clarify, like other TCG
core helpers.
Mechanical change doing:
$ sed -i -e 's/gen_move_low32/gen_move_low32_tl/' \
$(git grep -l gen_move_low32)
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
target/mips/tcg/translate.h | 2 +-
target/mips/tcg/mxu_translate.c | 2 +-
target/mips/tcg/translate.c | 30 ++++++++++++------------
target/mips/tcg/nanomips_translate.c.inc | 8 +++----
4 files changed, 21 insertions(+), 21 deletions(-)
diff --git a/target/mips/tcg/translate.h b/target/mips/tcg/translate.h
index 49f174d3617..6437180d891 100644
--- a/target/mips/tcg/translate.h
+++ b/target/mips/tcg/translate.h
@@ -153,7 +153,7 @@ void check_cp1_registers(DisasContext *ctx, int regs);
void check_cop1x(DisasContext *ctx);
void gen_base_offset_addr(DisasContext *ctx, TCGv addr, int base, int offset);
-void gen_move_low32(TCGv ret, TCGv_i64 arg);
+void gen_move_low32_tl(TCGv ret, TCGv_i64 arg);
void gen_move_high32(TCGv ret, TCGv_i64 arg);
void gen_load_gpr_tl(TCGv t, int reg);
void gen_store_gpr_tl(TCGv t, int reg);
diff --git a/target/mips/tcg/mxu_translate.c b/target/mips/tcg/mxu_translate.c
index 9525aebc053..94aa137cb25 100644
--- a/target/mips/tcg/mxu_translate.c
+++ b/target/mips/tcg/mxu_translate.c
@@ -4385,7 +4385,7 @@ static void gen_mxu_s32madd_sub(DisasContext *ctx, bool
sub, bool uns)
} else {
tcg_gen_add_i64(t3, t3, t2);
}
- gen_move_low32(t1, t3);
+ gen_move_low32_tl(t1, t3);
gen_move_high32(t0, t3);
tcg_gen_mov_tl(cpu_HI[0], t0);
diff --git a/target/mips/tcg/translate.c b/target/mips/tcg/translate.c
index 629846a596d..5e776136f09 100644
--- a/target/mips/tcg/translate.c
+++ b/target/mips/tcg/translate.c
@@ -1452,7 +1452,7 @@ static target_long addr_add(DisasContext *ctx,
target_long base,
}
/* Sign-extract the low 32-bits to a target_long. */
-void gen_move_low32(TCGv ret, TCGv_i64 arg)
+void gen_move_low32_tl(TCGv ret, TCGv_i64 arg)
{
#if defined(TARGET_MIPS64)
tcg_gen_ext32s_i64(ret, arg);
@@ -3341,7 +3341,7 @@ static void gen_muldiv(DisasContext *ctx, uint32_t opc,
tcg_gen_mul_i64(t2, t2, t3);
tcg_gen_concat_tl_i64(t3, cpu_LO[acc], cpu_HI[acc]);
tcg_gen_add_i64(t2, t2, t3);
- gen_move_low32(cpu_LO[acc], t2);
+ gen_move_low32_tl(cpu_LO[acc], t2);
gen_move_high32(cpu_HI[acc], t2);
}
break;
@@ -3357,7 +3357,7 @@ static void gen_muldiv(DisasContext *ctx, uint32_t opc,
tcg_gen_mul_i64(t2, t2, t3);
tcg_gen_concat_tl_i64(t3, cpu_LO[acc], cpu_HI[acc]);
tcg_gen_add_i64(t2, t2, t3);
- gen_move_low32(cpu_LO[acc], t2);
+ gen_move_low32_tl(cpu_LO[acc], t2);
gen_move_high32(cpu_HI[acc], t2);
}
break;
@@ -3371,7 +3371,7 @@ static void gen_muldiv(DisasContext *ctx, uint32_t opc,
tcg_gen_mul_i64(t2, t2, t3);
tcg_gen_concat_tl_i64(t3, cpu_LO[acc], cpu_HI[acc]);
tcg_gen_sub_i64(t2, t3, t2);
- gen_move_low32(cpu_LO[acc], t2);
+ gen_move_low32_tl(cpu_LO[acc], t2);
gen_move_high32(cpu_HI[acc], t2);
}
break;
@@ -3387,7 +3387,7 @@ static void gen_muldiv(DisasContext *ctx, uint32_t opc,
tcg_gen_mul_i64(t2, t2, t3);
tcg_gen_concat_tl_i64(t3, cpu_LO[acc], cpu_HI[acc]);
tcg_gen_sub_i64(t2, t3, t2);
- gen_move_low32(cpu_LO[acc], t2);
+ gen_move_low32_tl(cpu_LO[acc], t2);
gen_move_high32(cpu_HI[acc], t2);
}
break;
@@ -3482,10 +3482,10 @@ static void gen_mul_txx9(DisasContext *ctx, uint32_t
opc,
tcg_gen_mul_i64(t2, t2, t3);
tcg_gen_concat_tl_i64(t3, cpu_LO[acc], cpu_HI[acc]);
tcg_gen_add_i64(t2, t2, t3);
- gen_move_low32(cpu_LO[acc], t2);
+ gen_move_low32_tl(cpu_LO[acc], t2);
gen_move_high32(cpu_HI[acc], t2);
if (rd) {
- gen_move_low32(cpu_gpr[rd], t2);
+ gen_move_low32_tl(cpu_gpr[rd], t2);
}
}
break;
@@ -3504,10 +3504,10 @@ static void gen_mul_txx9(DisasContext *ctx, uint32_t
opc,
tcg_gen_mul_i64(t2, t2, t3);
tcg_gen_concat_tl_i64(t3, cpu_LO[acc], cpu_HI[acc]);
tcg_gen_add_i64(t2, t2, t3);
- gen_move_low32(cpu_LO[acc], t2);
+ gen_move_low32_tl(cpu_LO[acc], t2);
gen_move_high32(cpu_HI[acc], t2);
if (rd) {
- gen_move_low32(cpu_gpr[rd], t2);
+ gen_move_low32_tl(cpu_gpr[rd], t2);
}
}
break;
@@ -4787,7 +4787,7 @@ static void gen_align_bits(DisasContext *ctx, int wordsz,
int rd, int rs,
TCGv_i64 t2 = tcg_temp_new_i64();
tcg_gen_concat_tl_i64(t2, t1, t0);
tcg_gen_shri_i64(t2, t2, 32 - bits);
- gen_move_low32(cpu_gpr[rd], t2);
+ gen_move_low32_tl(cpu_gpr[rd], t2);
}
break;
#if defined(TARGET_MIPS64)
@@ -4865,7 +4865,7 @@ static inline void gen_mfhc0_entrylo(TCGv arg,
target_ulong off)
#else
tcg_gen_shri_i64(t0, t0, 32);
#endif
- gen_move_low32(arg, t0);
+ gen_move_low32_tl(arg, t0);
}
static inline void gen_mfhc0_load64(TCGv arg, target_ulong off, int shift)
@@ -4874,7 +4874,7 @@ static inline void gen_mfhc0_load64(TCGv arg,
target_ulong off, int shift)
tcg_gen_ld_i64(t0, tcg_env, off);
tcg_gen_shri_i64(t0, t0, 32 + shift);
- gen_move_low32(arg, t0);
+ gen_move_low32_tl(arg, t0);
}
static inline void gen_mfc0_load32(TCGv arg, target_ulong off)
@@ -5195,7 +5195,7 @@ static void gen_mfc0(DisasContext *ctx, TCGv arg, int
reg, int sel)
tcg_gen_deposit_tl(tmp, tmp, arg, 30, 2);
}
#endif
- gen_move_low32(arg, tmp);
+ gen_move_low32_tl(arg, tmp);
}
register_name = "EntryLo0";
break;
@@ -5252,7 +5252,7 @@ static void gen_mfc0(DisasContext *ctx, TCGv arg, int
reg, int sel)
tcg_gen_deposit_tl(tmp, tmp, arg, 30, 2);
}
#endif
- gen_move_low32(arg, tmp);
+ gen_move_low32_tl(arg, tmp);
}
register_name = "EntryLo1";
break;
@@ -5769,7 +5769,7 @@ static void gen_mfc0(DisasContext *ctx, TCGv arg, int
reg, int sel)
{
TCGv_i64 tmp = tcg_temp_new_i64();
tcg_gen_ld_i64(tmp, tcg_env, offsetof(CPUMIPSState,
CP0_TagLo));
- gen_move_low32(arg, tmp);
+ gen_move_low32_tl(arg, tmp);
}
register_name = "TagLo";
break;
diff --git a/target/mips/tcg/nanomips_translate.c.inc
b/target/mips/tcg/nanomips_translate.c.inc
index 31a31c00979..5a4a64f3609 100644
--- a/target/mips/tcg/nanomips_translate.c.inc
+++ b/target/mips/tcg/nanomips_translate.c.inc
@@ -1816,7 +1816,7 @@ static void gen_pool32axf_2_nanomips_insn(DisasContext
*ctx, uint32_t opc,
tcg_gen_mul_i64(t2, t2, t3);
tcg_gen_concat_tl_i64(t3, cpu_LO[acc], cpu_HI[acc]);
tcg_gen_add_i64(t2, t2, t3);
- gen_move_low32(cpu_LO[acc], t2);
+ gen_move_low32_tl(cpu_LO[acc], t2);
gen_move_high32(cpu_HI[acc], t2);
}
break;
@@ -1871,7 +1871,7 @@ static void gen_pool32axf_2_nanomips_insn(DisasContext
*ctx, uint32_t opc,
tcg_gen_mul_i64(t2, t2, t3);
tcg_gen_concat_tl_i64(t3, cpu_LO[acc], cpu_HI[acc]);
tcg_gen_add_i64(t2, t2, t3);
- gen_move_low32(cpu_LO[acc], t2);
+ gen_move_low32_tl(cpu_LO[acc], t2);
gen_move_high32(cpu_HI[acc], t2);
}
break;
@@ -1932,7 +1932,7 @@ static void gen_pool32axf_2_nanomips_insn(DisasContext
*ctx, uint32_t opc,
tcg_gen_mul_i64(t2, t2, t3);
tcg_gen_concat_tl_i64(t3, cpu_LO[acc], cpu_HI[acc]);
tcg_gen_sub_i64(t2, t3, t2);
- gen_move_low32(cpu_LO[acc], t2);
+ gen_move_low32_tl(cpu_LO[acc], t2);
gen_move_high32(cpu_HI[acc], t2);
}
break;
@@ -1973,7 +1973,7 @@ static void gen_pool32axf_2_nanomips_insn(DisasContext
*ctx, uint32_t opc,
tcg_gen_mul_i64(t2, t2, t3);
tcg_gen_concat_tl_i64(t3, cpu_LO[acc], cpu_HI[acc]);
tcg_gen_sub_i64(t2, t3, t2);
- gen_move_low32(cpu_LO[acc], t2);
+ gen_move_low32_tl(cpu_LO[acc], t2);
gen_move_high32(cpu_HI[acc], t2);
}
break;
--
2.45.2
- [PATCH 00/13] target/mips: Simplify some target_ulong registers to 32-bit, Philippe Mathieu-Daudé, 2024/11/26
- [PATCH 01/13] target/mips: Rename gen_load_gpr() -> gen_load_gpr_tl(), Philippe Mathieu-Daudé, 2024/11/26
- [PATCH 02/13] target/mips: Rename gen_store_gpr() -> gen_store_gpr_tl(), Philippe Mathieu-Daudé, 2024/11/26
- [PATCH 04/13] target/mips: Rename gen_move_high32() -> gen_move_high32_tl(), Philippe Mathieu-Daudé, 2024/11/26
- [PATCH 03/13] target/mips: Rename gen_move_low32() -> gen_move_low32_tl(),
Philippe Mathieu-Daudé <=
- [PATCH 05/13] target/mips: Rename gen_base_offset_addr() -> gen_base_offset_addr_tl(), Philippe Mathieu-Daudé, 2024/11/26
- [PATCH 06/13] target/mips: Rename gen_op_addr_add?() -> gen_op_addr_add?_tl(), Philippe Mathieu-Daudé, 2024/11/26
- [PATCH 09/13] target/mips: Introduce gen_move_low32_i32(), Philippe Mathieu-Daudé, 2024/11/26
- [PATCH 07/13] target/mips: Introduce gen_load_gpr_i32(), Philippe Mathieu-Daudé, 2024/11/26
- [PATCH 10/13] target/mips: Introduce gen_move_high32_i32(), Philippe Mathieu-Daudé, 2024/11/26