Skip to content

Commit

Permalink
bsd: add arm64 support
Browse files Browse the repository at this point in the history
  • Loading branch information
scribam committed Feb 19, 2024
1 parent 5150283 commit 890b0c9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions core/linux/context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,15 @@ static void context_segfault(host_context_t* hostctx, void* segfault_ctx)
#if defined(__APPLE__)
bicopy<ToSegfault>(hostctx->pc, MCTX(->__ss.__pc));
bicopy<ToSegfault>(hostctx->x0, MCTX(->__ss.__x[0]));
#elif defined(__FreeBSD__)
bicopy<ToSegfault>(hostctx->pc, MCTX(.mc_gpregs.gp_elr));
bicopy<ToSegfault>(hostctx->x0, MCTX(.mc_gpregs.gp_x[0]));
#elif defined(__NetBSD__)
bicopy<ToSegfault>(hostctx->pc, MCTX(.__gregs[_REG_ELR]));
bicopy<ToSegfault>(hostctx->x0, MCTX(.__gregs[_REG_X0]));
#elif defined(__OpenBSD__)
bicopy<ToSegfault>(hostctx->pc, MCTX(->sc_elr));
bicopy<ToSegfault>(hostctx->x0, MCTX(->sc_x));
#else
bicopy<ToSegfault>(hostctx->pc, MCTX(.pc));
bicopy<ToSegfault>(hostctx->x0, MCTX(.regs[0]));
Expand Down

0 comments on commit 890b0c9

Please sign in to comment.