[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 05/24] bsd-user/arm/target_arch_cpu.h: Implement target_cpu_clone
From: |
Warner Losh |
Subject: |
[PATCH 05/24] bsd-user/arm/target_arch_cpu.h: Implement target_cpu_clone_regs |
Date: |
Tue, 19 Oct 2021 10:44:28 -0600 |
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>
---
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 0f3538196d..c71ec000b3 100644
--- a/bsd-user/arm/target_arch_cpu.h
+++ b/bsd-user/arm/target_arch_cpu.h
@@ -35,6 +35,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.32.0
- [PATCH 03/24] bsd-user/arm/target_arch_cpu.c: Target specific TLS routines, (continued)
- [PATCH 03/24] bsd-user/arm/target_arch_cpu.c: Target specific TLS routines, Warner Losh, 2021/10/19
- [PATCH 04/24] bsd-user/arm/target_arch_cpu.h: CPU Loop definitions, Warner Losh, 2021/10/19
- [PATCH 01/24] bsd-user/arm/target_arch_sysarch.h: Use consistent include guards, Warner Losh, 2021/10/19
- [PATCH 05/24] bsd-user/arm/target_arch_cpu.h: Implement target_cpu_clone_regs,
Warner Losh <=
- [PATCH 07/24] bsd-user/arm/target_arch_cpu.h: Implment trivial EXCP exceptions, Warner Losh, 2021/10/19
- [PATCH 08/24] bsd-user/arm/target_arch_cpu.h: Implement data abort exceptions, Warner Losh, 2021/10/19
- [PATCH 09/24] bsd-user/arm/target_arch_cpu.h: Implement system call dispatch, Warner Losh, 2021/10/19