Provide _OFFSETOF_UC_GREGS_GP and use _OFFSETOF_UC_GREGS_* in getcontext
This commit is contained in:
parent
f820f85434
commit
24c5917e57
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: genassym.cf,v 1.2 2009/12/14 01:07:41 matt Exp $
|
||||
# $NetBSD: genassym.cf,v 1.3 2016/08/12 15:26:04 skrll Exp $
|
||||
|
||||
#
|
||||
# Copyright (c) 2001 The NetBSD Foundation, Inc.
|
||||
|
@ -36,8 +36,8 @@ include <ucontext.h>
|
|||
include <signal.h>
|
||||
include <sys/siginfo.h>
|
||||
|
||||
define _OFFSETOF_UC_GREGS offsetof(ucontext_t, uc_mcontext.__gregs[0])
|
||||
define _OFFSETOF_UC_GREGS_V0 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_V0])
|
||||
define _OFFSETOF_UC_GREGS_GP offsetof(ucontext_t, uc_mcontext.__gregs[_REG_GP])
|
||||
define _OFFSETOF_UC_GREGS_SP offsetof(ucontext_t, uc_mcontext.__gregs[_REG_SP])
|
||||
define _OFFSETOF_UC_GREGS_EPC offsetof(ucontext_t, uc_mcontext.__gregs[_REG_EPC])
|
||||
define _OFFSETOF_UC_LINK offsetof(ucontext_t, uc_link)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: getcontext.S,v 1.5 2016/08/10 16:45:24 skrll Exp $ */
|
||||
/* $NetBSD: getcontext.S,v 1.6 2016/08/12 15:26:04 skrll Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2001 The NetBSD Foundation, Inc.
|
||||
|
@ -34,7 +34,7 @@
|
|||
#include <machine/mcontext.h>
|
||||
|
||||
#if defined(SYSLIBC_SCCS) && !defined(lint)
|
||||
RCSID("$NetBSD: getcontext.S,v 1.5 2016/08/10 16:45:24 skrll Exp $")
|
||||
RCSID("$NetBSD: getcontext.S,v 1.6 2016/08/12 15:26:04 skrll Exp $")
|
||||
#endif /* SYSLIBC_SCCS && !lint */
|
||||
|
||||
#ifdef WEAK_ALIAS
|
||||
|
@ -47,12 +47,12 @@ LEAF(_getcontext)
|
|||
SYSTRAP(getcontext)
|
||||
bne a3, zero, 1f
|
||||
REG_PROLOGUE
|
||||
REG_S zero, (_OFFSETOF_UC_GREGS + _REG_V0 * SZREG)(a0)
|
||||
REG_S zero, _OFFSETOF_UC_GREGS_V0(a0)
|
||||
#if !defined(__mips_o32)
|
||||
/* PIC_PROLOGUE saved gp in t3 */
|
||||
REG_S t3, (_OFFSETOF_UC_GREGS + _REG_GP * SZREG)(a0)
|
||||
REG_S t3, _OFFSETOF_UC_GREGS_GP(a0)
|
||||
#endif
|
||||
REG_S ra, (_OFFSETOF_UC_GREGS + _REG_EPC * SZREG)(a0)
|
||||
REG_S ra, _OFFSETOF_UC_GREGS_EPC(a0)
|
||||
REG_EPILOGUE
|
||||
PIC_RETURN()
|
||||
1:
|
||||
|
|
Loading…
Reference in New Issue