]> git.proxmox.com Git - mirror_qemu.git/commitdiff
bsd-user/arm/target_arch_cpu.h: Implement target_cpu_clone_regs
authorWarner Losh <imp@bsdimp.com>
Thu, 23 Sep 2021 14:44:05 +0000 (08:44 -0600)
committerWarner Losh <imp@bsdimp.com>
Sat, 8 Jan 2022 05:58:51 +0000 (22:58 -0700)
Implement target_cpu_clone_regs to clone the resister state on a fork.

Signed-off-by: Stacey Son <sson@FreeBSD.org>
Signed-off-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Kyle Evans <kevans@FreeBSD.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
bsd-user/arm/target_arch_cpu.h

index 66215684d6fe8e6ae91e525f3683f2edb0692674..fa45d9335d651761a65627e20497cf6bba6eee9d 100644 (file)
@@ -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)
 {
 }