On Tue, Oct 19, 2021 at 11:45 AM Warner Losh <imp@bsdimp.com> wrote:
>
> Signed-off-by: Stacey Son <sson@FreeBSD.org>
> Signed-off-by: Klye Evans <kevans@FreeBSD.org>
> Signed-off-by: Warner Losh <imp@bsdimp.com>
> ---
> bsd-user/arm/target_arch_signal.h | 36 +++++++++++++++++++++++++++++++
> 1 file changed, 36 insertions(+)
>
> diff --git a/bsd-user/arm/target_arch_signal.h b/bsd-user/arm/target_arch_signal.h
> index 973183d99c..9fee58ca9c 100644
> --- a/bsd-user/arm/target_arch_signal.h
> +++ b/bsd-user/arm/target_arch_signal.h
> @@ -54,4 +54,40 @@
> #define TARGET_MINSIGSTKSZ (1024 * 4) /* min sig stack size */
> #define TARGET_SIGSTKSZ (TARGET_MINSIGSTKSZ + 32768) /* recommended size */
>
> +/* arm/arm/machdep.c */
> +struct target_sigcontext {
> + target_sigset_t sc_mask; /* signal mask to retstore */
> + int32_t sc_onstack; /* sigstack state to restore */
> + abi_long sc_pc; /* pc at time of signal */
> + abi_long sc_reg[32]; /* processor regs 0 to 31 */
> + abi_long mullo, mulhi; /* mullo and mulhi registers */
> + int32_t sc_fpused; /* fp has been used */
> + abi_long sc_fpregs[33]; /* fp regs 0 to 31 & csr */
> + abi_long sc_fpc_eir; /* fp exception instr reg */
> + /* int32_t reserved[8]; */
> +};
> +
> +typedef struct {
> + uint32_t __fp_fpsr;
> + struct {
> + uint32_t __fp_exponent;
> + uint32_t __fp_mantissa_hi;
> + uint32_t __fp_mantissa_lo;
> + } __fp_fr[8];
> +} target__fpregset_t;
> +
> +typedef struct {
> + uint32_t __vfp_fpscr;
> + uint32_t __vfp_fstmx[33];
> + uint32_t __vfp_fpsid;
> +} target__vfpregset_t;
> +
> +typedef struct target_mcontext {
> + uint32_t __gregs[TARGET__NGREG];
> + union {
> + target__fpregset_t __fpregs;
> + target__vfpregset_t __vfpregs;
> + } __fpu;
> +} target_mcontext_t;
> +
> #endif /* !_TARGET_ARCH_SIGNAL_H_ */
> --
> 2.32.0
>
Reviewed-by: Kyle Evans <kevans@FreeBSD.org>