From e17d4c9a3701ca22170cd3bbbd42c9eddad97e84 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Thu, 23 Sep 2021 08:44:05 -0600 Subject: [PATCH] bsd-user/arm/target_arch_cpu.h: Implement target_cpu_clone_regs Implement target_cpu_clone_regs to clone the resister state on a fork. Signed-off-by: Stacey Son Signed-off-by: Warner Losh Reviewed-by: Kyle Evans Reviewed-by: Richard Henderson --- bsd-user/arm/target_arch_cpu.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bsd-user/arm/target_arch_cpu.h b/bsd-user/arm/target_arch_cpu.h index 66215684d6..fa45d9335d 100644 --- a/bsd-user/arm/target_arch_cpu.h +++ b/bsd-user/arm/target_arch_cpu.h @@ -36,6 +36,14 @@ static inline void target_cpu_init(CPUARMState *env, } } +static inline void target_cpu_clone_regs(CPUARMState *env, target_ulong newsp) +{ + if (newsp) { + env->regs[13] = newsp; + } + env->regs[0] = 0; +} + static inline void target_cpu_reset(CPUArchState *cpu) { } -- 2.39.5