[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 05/29] bsd-user/arm/target_arch_cpu.h: Implement target_cpu_cl
From: |
Warner Losh |
Subject: |
[PATCH v3 05/29] bsd-user/arm/target_arch_cpu.h: Implement target_cpu_clone_regs |
Date: |
Thu, 4 Nov 2021 08:05:12 -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>
Reviewed-by: Kyle Evans <kevans@FreeBSD.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
---
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.33.0
- [PATCH v3 00/29] bsd-user: arm (32-bit) support, Warner Losh, 2021/11/04
- [PATCH v3 01/29] bsd-user/arm/target_arch_sysarch.h: Use consistent include guards, Warner Losh, 2021/11/04
- [PATCH v3 02/29] bsd-user/arm/target_syscall.h: Add copyright and update name, Warner Losh, 2021/11/04
- [PATCH v3 03/29] bsd-user/arm/target_arch_cpu.c: Target specific TLS routines, Warner Losh, 2021/11/04
- [PATCH v3 05/29] bsd-user/arm/target_arch_cpu.h: Implement target_cpu_clone_regs,
Warner Losh <=
- [PATCH v3 07/29] bsd-user/arm/target_arch_cpu.h: Implement trivial EXCP exceptions, Warner Losh, 2021/11/04
- [PATCH v3 04/29] bsd-user/arm/target_arch_cpu.h: CPU Loop definitions, Warner Losh, 2021/11/04
- [PATCH v3 06/29] bsd-user/arm/target_arch_cpu.h: Dummy target_cpu_loop implementation, Warner Losh, 2021/11/04
- [PATCH v3 08/29] bsd-user/arm/target_arch_cpu.h: Implement data abort exceptions, Warner Losh, 2021/11/04
- [PATCH v3 09/29] bsd-user/arm/target_arch_cpu.h: Implement system call dispatch, Warner Losh, 2021/11/04
- [PATCH v3 10/29] bsd-user/arm/target_arch_reg.h: Implement core dump register copying, Warner Losh, 2021/11/04
- [PATCH v3 11/29] bsd-user/arm/target_arch_vmparam.h: Parameters for arm address space, Warner Losh, 2021/11/04
- [PATCH v3 12/29] bsd-user/arm/target_arch_sigtramp.h: Signal Trampoline for arm, Warner Losh, 2021/11/04
- [PATCH v3 14/29] bsd-user/arm/target_arch_elf.h: arm defines for ELF, Warner Losh, 2021/11/04