hw/core/generic-loader: Do not open-code cpu_set_pc()
Directly call cpu_set_pc() instead of open-coding it. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20250122093028.52416-2-philmd@linaro.org>
This commit is contained in:
parent
f821d894de
commit
2beb871dc2
@ -47,11 +47,8 @@ static void generic_loader_reset(void *opaque)
|
|||||||
GenericLoaderState *s = GENERIC_LOADER(opaque);
|
GenericLoaderState *s = GENERIC_LOADER(opaque);
|
||||||
|
|
||||||
if (s->set_pc) {
|
if (s->set_pc) {
|
||||||
CPUClass *cc = CPU_GET_CLASS(s->cpu);
|
|
||||||
cpu_reset(s->cpu);
|
cpu_reset(s->cpu);
|
||||||
if (cc) {
|
cpu_set_pc(s->cpu, s->addr);
|
||||||
cc->set_pc(s->cpu, s->addr);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (s->data_len) {
|
if (s->data_len) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user