Commit a148ca7627 for qemu.org
commit a148ca762788a47d35f307411c6611c80ea07d35
Author: Peter Maydell <peter.maydell@linaro.org>
Date: Mon Jul 20 19:05:30 2026 +0100
target/ppc: Remove unused helper_lscbx()
The helper_lscbx() function isn't called anywhere. It used to be
used by the PPC 601 CPU support; we removed that in commit 005b69fdcc
in 2022 but missed this helper function.
Fixes: 005b69fdcc ("target/ppc: Remove PowerPC 601 CPUs")
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Amit Machhiwal <amachhiw@linux.ibm.com>
Message-id: 20260709095056.1803725-1-peter.maydell@linaro.org
diff --git a/target/ppc/helper.h b/target/ppc/helper.h
index e99c8c824b..6b2d19a3ad 100644
--- a/target/ppc/helper.h
+++ b/target/ppc/helper.h
@@ -54,7 +54,6 @@ DEF_HELPER_FLAGS_2(dcbzl, TCG_CALL_NO_WG, void, env, tl)
#endif
DEF_HELPER_FLAGS_2(icbi, TCG_CALL_NO_WG, void, env, tl)
DEF_HELPER_FLAGS_2(icbiep, TCG_CALL_NO_WG, void, env, tl)
-DEF_HELPER_5(lscbx, tl, env, tl, i32, i32, i32)
#if defined(TARGET_PPC64)
DEF_HELPER_4(DIVDEU, i64, env, i64, i64, i32)
diff --git a/target/ppc/mem_helper.c b/target/ppc/mem_helper.c
index 119dc1df23..787ba2cdec 100644
--- a/target/ppc/mem_helper.c
+++ b/target/ppc/mem_helper.c
@@ -367,34 +367,6 @@ void helper_icbiep(CPUPPCState *env, target_ulong addr)
#endif
}
-/* XXX: to be tested */
-target_ulong helper_lscbx(CPUPPCState *env, target_ulong addr, uint32_t reg,
- uint32_t ra, uint32_t rb)
-{
- int i, c, d;
-
- d = 24;
- for (i = 0; i < xer_bc; i++) {
- c = cpu_ldub_data_ra(env, addr, GETPC());
- addr = addr_add(env, addr, 1);
- /* ra (if not 0) and rb are never modified */
- if (likely(reg != rb && (ra == 0 || reg != ra))) {
- env->gpr[reg] = (env->gpr[reg] & ~(0xFF << d)) | (c << d);
- }
- if (unlikely(c == xer_cmp)) {
- break;
- }
- if (likely(d != 0)) {
- d -= 8;
- } else {
- d = 24;
- reg++;
- reg = reg & 0x1F;
- }
- }
- return i;
-}
-
/*****************************************************************************/
/* Altivec extension helpers */
#if HOST_BIG_ENDIAN