[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 12/56] target/mips: Remove helpers accessing SAARI register
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 12/56] target/mips: Remove helpers accessing SAARI register |
Date: |
Thu, 15 Feb 2024 18:57:06 +0100 |
DisasContext::saar boolean is never set, so this code
is not reachable. Remove it.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20240209090513.9401-9-philmd@linaro.org>
---
target/mips/tcg/sysemu_helper.h.inc | 1 -
target/mips/tcg/sysemu/cp0_helper.c | 8 --------
target/mips/tcg/translate.c | 20 --------------------
3 files changed, 29 deletions(-)
diff --git a/target/mips/tcg/sysemu_helper.h.inc
b/target/mips/tcg/sysemu_helper.h.inc
index 78f7272208..1861d538de 100644
--- a/target/mips/tcg/sysemu_helper.h.inc
+++ b/target/mips/tcg/sysemu_helper.h.inc
@@ -100,7 +100,6 @@ DEF_HELPER_2(mtc0_srsconf4, void, env, tl)
DEF_HELPER_2(mtc0_hwrena, void, env, tl)
DEF_HELPER_2(mtc0_pwctl, void, env, tl)
DEF_HELPER_2(mtc0_count, void, env, tl)
-DEF_HELPER_2(mtc0_saari, void, env, tl)
DEF_HELPER_2(mtc0_entryhi, void, env, tl)
DEF_HELPER_2(mttc0_entryhi, void, env, tl)
DEF_HELPER_2(mtc0_compare, void, env, tl)
diff --git a/target/mips/tcg/sysemu/cp0_helper.c
b/target/mips/tcg/sysemu/cp0_helper.c
index f8883a3515..ded6c78e9a 100644
--- a/target/mips/tcg/sysemu/cp0_helper.c
+++ b/target/mips/tcg/sysemu/cp0_helper.c
@@ -1077,14 +1077,6 @@ void helper_mtc0_count(CPUMIPSState *env, target_ulong
arg1)
cpu_mips_store_count(env, arg1);
}
-void helper_mtc0_saari(CPUMIPSState *env, target_ulong arg1)
-{
- uint32_t target = arg1 & 0x3f;
- if (target <= 1) {
- env->CP0_SAARI = target;
- }
-}
-
void helper_mtc0_entryhi(CPUMIPSState *env, target_ulong arg1)
{
target_ulong old, val, mask;
diff --git a/target/mips/tcg/translate.c b/target/mips/tcg/translate.c
index 173b19a090..3ba2101647 100644
--- a/target/mips/tcg/translate.c
+++ b/target/mips/tcg/translate.c
@@ -5653,11 +5653,6 @@ static void gen_mfc0(DisasContext *ctx, TCGv arg, int
reg, int sel)
ctx->base.is_jmp = DISAS_EXIT;
register_name = "Count";
break;
- case CP0_REG09__SAARI:
- CP0_CHECK(ctx->saar);
- gen_mfc0_load32(arg, offsetof(CPUMIPSState, CP0_SAARI));
- register_name = "SAARI";
- break;
default:
goto cp0_unimplemented;
}
@@ -6374,11 +6369,6 @@ static void gen_mtc0(DisasContext *ctx, TCGv arg, int
reg, int sel)
gen_helper_mtc0_count(tcg_env, arg);
register_name = "Count";
break;
- case CP0_REG09__SAARI:
- CP0_CHECK(ctx->saar);
- gen_helper_mtc0_saari(tcg_env, arg);
- register_name = "SAARI";
- break;
default:
goto cp0_unimplemented;
}
@@ -7143,11 +7133,6 @@ static void gen_dmfc0(DisasContext *ctx, TCGv arg, int
reg, int sel)
ctx->base.is_jmp = DISAS_EXIT;
register_name = "Count";
break;
- case CP0_REG09__SAARI:
- CP0_CHECK(ctx->saar);
- gen_mfc0_load32(arg, offsetof(CPUMIPSState, CP0_SAARI));
- register_name = "SAARI";
- break;
default:
goto cp0_unimplemented;
}
@@ -7850,11 +7835,6 @@ static void gen_dmtc0(DisasContext *ctx, TCGv arg, int
reg, int sel)
gen_helper_mtc0_count(tcg_env, arg);
register_name = "Count";
break;
- case CP0_REG09__SAARI:
- CP0_CHECK(ctx->saar);
- gen_helper_mtc0_saari(tcg_env, arg);
- register_name = "SAARI";
- break;
default:
goto cp0_unimplemented;
}
--
2.41.0
- [PULL 02/56] hw/mips: remove unnecessary "select PTIMER", (continued)
- [PULL 02/56] hw/mips: remove unnecessary "select PTIMER", Philippe Mathieu-Daudé, 2024/02/15
- [PULL 04/56] target/mips: Remove helpers accessing SAAR registers, Philippe Mathieu-Daudé, 2024/02/15
- [PULL 05/56] hw/misc/mips: Reduce itc_reconfigure() scope, Philippe Mathieu-Daudé, 2024/02/15
- [PULL 03/56] target/mips: Use qemu_irq typedef for CPUMIPSState::irq member, Philippe Mathieu-Daudé, 2024/02/15
- [PULL 06/56] target/mips: Remove MIPSITUState::itu field, Philippe Mathieu-Daudé, 2024/02/15
- [PULL 07/56] target/mips: Remove CPUMIPSState::saarp field, Philippe Mathieu-Daudé, 2024/02/15
- [PULL 08/56] hw/misc/mips_itu: Remove MIPSITUState::cpu0 field, Philippe Mathieu-Daudé, 2024/02/15
- [PULL 09/56] hw/misc/mips_itu: Remove MIPSITUState::saar field, Philippe Mathieu-Daudé, 2024/02/15
- [PULL 10/56] target/mips: Remove unused mips_def_t::SAARP field, Philippe Mathieu-Daudé, 2024/02/15
- [PULL 11/56] target/mips: Remove CPUMIPSState::CP0_SAAR[2] field, Philippe Mathieu-Daudé, 2024/02/15
- [PULL 12/56] target/mips: Remove helpers accessing SAARI register,
Philippe Mathieu-Daudé <=
- [PULL 13/56] target/mips: Remove CPUMIPSState::CP0_SAARI field, Philippe Mathieu-Daudé, 2024/02/15
- [PULL 14/56] target/mips: Remove the unused DisasContext::saar field, Philippe Mathieu-Daudé, 2024/02/15
- [PULL 15/56] hw/isa: clean up Kconfig selections for ISA_SUPERIO, Philippe Mathieu-Daudé, 2024/02/15
- [PULL 17/56] hw/isa: fix ISA_SUPERIO dependencies, Philippe Mathieu-Daudé, 2024/02/15
- [PULL 16/56] hw/mips/Kconfig: Remove ISA dependencies from MIPSsim board, Philippe Mathieu-Daudé, 2024/02/15
- [PULL 18/56] hw/isa: specify instance_size in isa_superio_type_info, Philippe Mathieu-Daudé, 2024/02/15
- [PULL 19/56] hw/isa: extract FDC37M81X to a separate file, Philippe Mathieu-Daudé, 2024/02/15
- [PULL 20/56] hw/rx/rx62n: Reduce inclusion of 'qemu/units.h', Philippe Mathieu-Daudé, 2024/02/15
- [PULL 21/56] hw/rx/rx62n: Only call qdev_get_gpio_in() when necessary, Philippe Mathieu-Daudé, 2024/02/15
- [PULL 22/56] hw/i386/q35: Realize LPC PCI function before accessing it, Philippe Mathieu-Daudé, 2024/02/15