Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/arch/mips Provide _OFFSETOF_UC_GREGS_GP and use _OF...



details:   https://anonhg.NetBSD.org/src/rev/a2a86fa179ea
branches:  trunk
changeset: 347077:a2a86fa179ea
user:      skrll <skrll%NetBSD.org@localhost>
date:      Fri Aug 12 15:26:04 2016 +0000

description:
Provide _OFFSETOF_UC_GREGS_GP and use _OFFSETOF_UC_GREGS_* in getcontext

diffstat:

 lib/libc/arch/mips/genassym.cf      |   4 ++--
 lib/libc/arch/mips/sys/getcontext.S |  10 +++++-----
 2 files changed, 7 insertions(+), 7 deletions(-)

diffs (53 lines):

diff -r f02a495db3b4 -r a2a86fa179ea lib/libc/arch/mips/genassym.cf
--- a/lib/libc/arch/mips/genassym.cf    Fri Aug 12 15:21:25 2016 +0000
+++ b/lib/libc/arch/mips/genassym.cf    Fri Aug 12 15:26:04 2016 +0000
@@ -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 <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)
diff -r f02a495db3b4 -r a2a86fa179ea lib/libc/arch/mips/sys/getcontext.S
--- a/lib/libc/arch/mips/sys/getcontext.S       Fri Aug 12 15:21:25 2016 +0000
+++ b/lib/libc/arch/mips/sys/getcontext.S       Fri Aug 12 15:26:04 2016 +0000
@@ -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 @@
        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:



Home | Main Index | Thread Index | Old Index