mirror of
git://repo.or.cz/tinycc.git
synced 2026-07-07 03:48:40 +08:00
Add register definitions for OpenBSD/riscv64
This commit is contained in:
parent
ab13f1a25a
commit
46bf3f940c
3
tccrun.c
3
tccrun.c
@ -733,6 +733,9 @@ static void rt_getcontext(ucontext_t *uc, rt_context *rc)
|
|||||||
#elif defined(__aarch64__)
|
#elif defined(__aarch64__)
|
||||||
rc->ip = uc->uc_mcontext.pc;
|
rc->ip = uc->uc_mcontext.pc;
|
||||||
rc->fp = uc->uc_mcontext.regs[29];
|
rc->fp = uc->uc_mcontext.regs[29];
|
||||||
|
#elif defined(__riscv) && defined(__OpenBSD__)
|
||||||
|
rc->ip = uc->sc_sepc;
|
||||||
|
rc->fp = uc->sc_s[0];
|
||||||
#elif defined(__riscv)
|
#elif defined(__riscv)
|
||||||
rc->ip = uc->uc_mcontext.__gregs[REG_PC];
|
rc->ip = uc->uc_mcontext.__gregs[REG_PC];
|
||||||
rc->fp = uc->uc_mcontext.__gregs[REG_S0];
|
rc->fp = uc->uc_mcontext.__gregs[REG_S0];
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user