[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/3] target/cpus: Remove pointless re-assignment of CPUState::exc
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 2/3] target/cpus: Remove pointless re-assignment of CPUState::exception_index |
Date: |
Mon, 30 Dec 2024 16:39:28 +0100 |
The CPUState::exception_index field is always re-initialized
by the parent CPU ResetHold() handler in cpu_common_reset_hold(),
no need to have targets manually initializing it.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
target/hppa/cpu.c | 1 -
target/loongarch/cpu.c | 1 -
target/openrisc/cpu.c | 1 -
3 files changed, 3 deletions(-)
diff --git a/target/hppa/cpu.c b/target/hppa/cpu.c
index 6e5434a8e99..9b355bfe902 100644
--- a/target/hppa/cpu.c
+++ b/target/hppa/cpu.c
@@ -203,7 +203,6 @@ static void hppa_cpu_reset_hold(Object *obj, ResetType type)
if (scc->parent_phases.hold) {
scc->parent_phases.hold(obj, type);
}
- cs->exception_index = -1;
cs->halted = 0;
cpu_set_pc(cs, 0xf0000004);
diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c
index d611a604704..fd062d2e3e1 100644
--- a/target/loongarch/cpu.c
+++ b/target/loongarch/cpu.c
@@ -584,7 +584,6 @@ static void loongarch_cpu_reset_hold(Object *obj, ResetType
type)
#ifdef CONFIG_TCG
restore_fp_status(env);
#endif
- cs->exception_index = -1;
}
static void loongarch_cpu_disas_set_info(CPUState *s, disassemble_info *info)
diff --git a/target/openrisc/cpu.c b/target/openrisc/cpu.c
index b7bab0d7abf..84aa9448256 100644
--- a/target/openrisc/cpu.c
+++ b/target/openrisc/cpu.c
@@ -101,7 +101,6 @@ static void openrisc_cpu_reset_hold(Object *obj, ResetType
type)
cpu->env.pc = 0x100;
cpu->env.sr = SR_FO | SR_SM;
cpu->env.lock_addr = -1;
- cs->exception_index = -1;
cpu_set_fpcsr(&cpu->env, 0);
set_float_detect_tininess(float_tininess_before_rounding,
--
2.47.1