aboutsummaryrefslogtreecommitdiff
path: root/bsd-user
diff options
context:
space:
mode:
authorWarner Losh <imp@bsdimp.com>2021-09-23 08:44:05 -0600
committerWarner Losh <imp@bsdimp.com>2022-01-07 22:58:51 -0700
commite17d4c9a3701ca22170cd3bbbd42c9eddad97e84 (patch)
tree821892860cffff4833a7157bffb56f9b3d94b748 /bsd-user
parentca5d32a3f30e4bd01aa36b948e42302f40443501 (diff)
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 <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>
Diffstat (limited to 'bsd-user')
-rw-r--r--bsd-user/arm/target_arch_cpu.h8
1 files changed, 8 insertions, 0 deletions
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)
{
}