NetBSD: arm64 is curiously detected as evbarm. Struct uc_mcontext is once again different.

This commit is contained in:
Christian Jullien 2020-12-23 20:08:26 +01:00
parent f7d2d04d96
commit ba61c7bb37
2 changed files with 4 additions and 1 deletions

2
configure vendored
View File

@ -178,7 +178,7 @@ case "$cpu" in
x86_64|amd64|x86-64)
cpu="x86_64"
;;
aarch64|arm64)
aarch64|arm64|evbarm)
cpu="aarch64"
;;
arm*)

View File

@ -667,6 +667,9 @@ static void rt_getcontext(ucontext_t *uc, rt_context *rc)
#elif defined(__aarch64__) && defined(__FreeBSD__)
rc->ip = uc->uc_mcontext.mc_gpregs.gp_elr; /* aka REG_PC */
rc->fp = uc->uc_mcontext.mc_gpregs.gp_x[29];
#elif defined(__aarch64__) && defined(__NetBSD__)
rc->ip = uc->uc_mcontext.__gregs[_REG_PC];
rc->fp = uc->uc_mcontext.__gregs[_REG_FP];
#elif defined(__aarch64__)
rc->ip = uc->uc_mcontext.pc;
rc->fp = uc->uc_mcontext.regs[29];