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/sys We need to save the GP of the caller ...
details: https://anonhg.NetBSD.org/src/rev/11bd2cf57739
branches: trunk
changeset: 347003:11bd2cf57739
user: skrll <skrll%NetBSD.org@localhost>
date: Wed Aug 10 16:45:24 2016 +0000
description:
We need to save the GP of the caller in the context for n32/n64
diffstat:
lib/libc/arch/mips/sys/getcontext.S | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (29 lines):
diff -r ec7fbd39dbe4 -r 11bd2cf57739 lib/libc/arch/mips/sys/getcontext.S
--- a/lib/libc/arch/mips/sys/getcontext.S Wed Aug 10 16:40:24 2016 +0000
+++ b/lib/libc/arch/mips/sys/getcontext.S Wed Aug 10 16:45:24 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: getcontext.S,v 1.4 2009/12/14 01:07:42 matt Exp $ */
+/* $NetBSD: getcontext.S,v 1.5 2016/08/10 16:45:24 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.4 2009/12/14 01:07:42 matt Exp $")
+ RCSID("$NetBSD: getcontext.S,v 1.5 2016/08/10 16:45:24 skrll Exp $")
#endif /* SYSLIBC_SCCS && !lint */
#ifdef WEAK_ALIAS
@@ -48,6 +48,10 @@
bne a3, zero, 1f
REG_PROLOGUE
REG_S zero, (_OFFSETOF_UC_GREGS + _REG_V0 * SZREG)(a0)
+#if !defined(__mips_o32)
+ /* PIC_PROLOGUE saved gp in t3 */
+ REG_S t3, (_OFFSETOF_UC_GREGS + _REG_GP * SZREG)(a0)
+#endif
REG_S ra, (_OFFSETOF_UC_GREGS + _REG_EPC * SZREG)(a0)
REG_EPILOGUE
PIC_RETURN()
Home |
Main Index |
Thread Index |
Old Index