diff options
| author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2025-01-21 12:12:21 +0100 |
|---|---|---|
| committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2025-03-06 15:46:18 +0100 |
| commit | 2beb871dc20b57fc4b1ec2285dfc2145baf9df80 (patch) | |
| tree | 43a078b6476a04928cc347deb01bb9238d9d9c48 /hw/core/generic-loader.c | |
| parent | f821d894de2025611f2b19598fc4191ac4167ed9 (diff) | |
| download | focaccia-qemu-2beb871dc20b57fc4b1ec2285dfc2145baf9df80.tar.gz focaccia-qemu-2beb871dc20b57fc4b1ec2285dfc2145baf9df80.zip | |
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>
Diffstat (limited to 'hw/core/generic-loader.c')
| -rw-r--r-- | hw/core/generic-loader.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/hw/core/generic-loader.c b/hw/core/generic-loader.c index d9f5c2e832..d3a426a1a2 100644 --- a/hw/core/generic-loader.c +++ b/hw/core/generic-loader.c @@ -47,11 +47,8 @@ static void generic_loader_reset(void *opaque) GenericLoaderState *s = GENERIC_LOADER(opaque); if (s->set_pc) { - CPUClass *cc = CPU_GET_CLASS(s->cpu); cpu_reset(s->cpu); - if (cc) { - cc->set_pc(s->cpu, s->addr); - } + cpu_set_pc(s->cpu, s->addr); } if (s->data_len) { |