diff options
| author | Richard Henderson <richard.henderson@linaro.org> | 2025-07-28 21:51:02 -1000 |
|---|---|---|
| committer | Richard Henderson <richard.henderson@linaro.org> | 2025-08-28 06:39:25 +1000 |
| commit | 011480ff599d76e62a0e49ddd21ba9023cdb0ec3 (patch) | |
| tree | 3a97339e5c5fe24a8c268a924d19a7ab1123a134 /linux-user/sh4/cpu_loop.c | |
| parent | 83411d840cfd80d7288ea096d905413754a87c66 (diff) | |
| download | focaccia-qemu-011480ff599d76e62a0e49ddd21ba9023cdb0ec3.tar.gz focaccia-qemu-011480ff599d76e62a0e49ddd21ba9023cdb0ec3.zip | |
linux-user/sh4: Create init_main_thread
Merge init_thread and target_cpu_copy_regs. There's no point going through a target_pt_regs intermediate. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'linux-user/sh4/cpu_loop.c')
| -rw-r--r-- | linux-user/sh4/cpu_loop.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/linux-user/sh4/cpu_loop.c b/linux-user/sh4/cpu_loop.c index ee9eff3428..259ea1cc8b 100644 --- a/linux-user/sh4/cpu_loop.c +++ b/linux-user/sh4/cpu_loop.c @@ -81,12 +81,10 @@ void cpu_loop(CPUSH4State *env) } } -void target_cpu_copy_regs(CPUArchState *env, target_pt_regs *regs) +void init_main_thread(CPUState *cs, struct image_info *info) { - int i; + CPUArchState *env = cpu_env(cs); - for(i = 0; i < 16; i++) { - env->gregs[i] = regs->regs[i]; - } - env->pc = regs->pc; + env->pc = info->entry; + env->gregs[15] = info->start_stack; } |