On 1/25/22 12:29, Warner Losh wrote:
FreeBSD's get_mcontext doesn't return any vfp data. Instead, it zeros
out the vfp feilds (and all the spare fields). Impelement this
behavior. We're still missing the sysarch(ARM_GET_VFPCONTEXT) syscall,
though.

Signed-off-by: Warner Losh <i...@bsdimp.com>
---
  bsd-user/arm/signal.c | 8 ++++++++
  1 file changed, 8 insertions(+)

diff --git a/bsd-user/arm/signal.c b/bsd-user/arm/signal.c
index 9026343b478..6eadc6e3c56 100644
--- a/bsd-user/arm/signal.c
+++ b/bsd-user/arm/signal.c
@@ -109,6 +109,14 @@ abi_long get_mcontext(CPUARMState *env, target_mcontext_t 
*mcp, int flags)
      gr[TARGET_REG_LR] = tswap32(env->regs[14]);
      gr[TARGET_REG_PC] = tswap32(env->regs[15]);
+ /*
+     * FreeBSD's set_mcontext doesn't save VFP info, but blanks it out instead.
+     * Instead, sysarch(ARM_GET_VFPSTATE) is used instead.
+     */

Could be rewritten with fewer "instead".  You wanted get_mcontext.
Otherwise,

Reviewed-by: Richard Henderson <richard.hender...@linaro.org>


r~


Reply via email to