From 1018ee87497d478cc0a327a6bd0d019cbfe57321 Mon Sep 17 00:00:00 2001 From: Christian Jullien Date: Sun, 10 Jan 2021 11:56:14 +0100 Subject: [PATCH] OpenBSD: aarch64 99% working, armv7 WIP. --- tccrun.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tccrun.c b/tccrun.c index 6c2546ef..d59df8fa 100644 --- a/tccrun.c +++ b/tccrun.c @@ -664,6 +664,9 @@ static void rt_getcontext(ucontext_t *uc, rt_context *rc) #elif defined(__arm__) && defined(__NetBSD__) rc->ip = uc->uc_mcontext.__gregs[_REG_PC]; rc->fp = uc->uc_mcontext.__gregs[_REG_FP]; +#elif defined(__arm__) && defined(__OpenBSD__) + rc->ip = uc->sc_pc; + rc->fp = uc->sc_fpreg[29]; #elif defined(__arm__) rc->ip = uc->uc_mcontext.arm_pc; rc->fp = uc->uc_mcontext.arm_fp; @@ -673,6 +676,9 @@ static void rt_getcontext(ucontext_t *uc, rt_context *rc) #elif defined(__aarch64__) && defined(__NetBSD__) rc->ip = uc->uc_mcontext.__gregs[_REG_PC]; rc->fp = uc->uc_mcontext.__gregs[_REG_FP]; +#elif defined(__aarch64__) && defined(__OpenBSD__) + rc->ip = uc->sc_elr; + rc->fp = uc->sc_x[29]; #elif defined(__aarch64__) rc->ip = uc->uc_mcontext.pc; rc->fp = uc->uc_mcontext.regs[29];