Source-Changes-HG archive

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

[src/trunk]: src Provide a genassym.cf in libc for hppa and use it.



details:   https://anonhg.NetBSD.org/src/rev/602932f8271c
branches:  trunk
changeset: 326816:602932f8271c
user:      skrll <skrll%NetBSD.org@localhost>
date:      Wed Feb 19 13:01:51 2014 +0000

description:
Provide a genassym.cf in libc for hppa and use it.

diffstat:

 lib/libc/arch/hppa/Makefile.inc      |   4 ++-
 lib/libc/arch/hppa/gen/swapcontext.S |   6 +++-
 lib/libc/arch/hppa/genassym.cf       |  39 ++++++++++++++++++++++++++++++++++++
 lib/libc/arch/hppa/sys/getcontext.S  |   8 +-----
 sys/arch/hppa/include/mcontext.h     |   4 +--
 5 files changed, 49 insertions(+), 12 deletions(-)

diffs (126 lines):

diff -r 86df3e358b57 -r 602932f8271c lib/libc/arch/hppa/Makefile.inc
--- a/lib/libc/arch/hppa/Makefile.inc   Wed Feb 19 12:28:38 2014 +0000
+++ b/lib/libc/arch/hppa/Makefile.inc   Wed Feb 19 13:01:51 2014 +0000
@@ -1,7 +1,9 @@
-#      $NetBSD: Makefile.inc,v 1.9 2009/10/21 19:30:46 skrll Exp $
+#      $NetBSD: Makefile.inc,v 1.10 2014/02/19 13:01:51 skrll Exp $
 
 #      $OpenBSD: Makefile.inc,v 1.3 1999/12/25 06:02:10 mickey Exp $
 
 SRCS+= __sigaction14_sigtramp.c __sigtramp2.S
 
 SRCS+= bcopy.c
+
+CPPFLAGS+= -I.
diff -r 86df3e358b57 -r 602932f8271c lib/libc/arch/hppa/gen/swapcontext.S
--- a/lib/libc/arch/hppa/gen/swapcontext.S      Wed Feb 19 12:28:38 2014 +0000
+++ b/lib/libc/arch/hppa/gen/swapcontext.S      Wed Feb 19 13:01:51 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: swapcontext.S,v 1.5 2012/09/12 02:00:52 manu Exp $     */
+/*     $NetBSD: swapcontext.S,v 1.6 2014/02/19 13:01:51 skrll Exp $    */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -30,10 +30,12 @@
  */
 
 #include "SYS.h"
+#include "assym.h"
+
 #include <machine/mcontext.h>
 
 #if defined(SYSLIBC_SCCS) && !defined(lint)
-       RCSID("$NetBSD: swapcontext.S,v 1.5 2012/09/12 02:00:52 manu Exp $")
+       RCSID("$NetBSD: swapcontext.S,v 1.6 2014/02/19 13:01:51 skrll Exp $")
 #endif /* SYSLIBC_SCCS && !lint */
 
 LEAF_ENTRY(swapcontext)
diff -r 86df3e358b57 -r 602932f8271c lib/libc/arch/hppa/genassym.cf
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libc/arch/hppa/genassym.cf    Wed Feb 19 13:01:51 2014 +0000
@@ -0,0 +1,39 @@
+#      $NetBSD: genassym.cf,v 1.1 2014/02/19 13:01:51 skrll Exp $
+
+#
+# Copyright (c) 2014 The NetBSD Foundation, Inc.
+# All rights reserved.
+#
+# This code is derived from software contributed to The NetBSD Foundation
+# by Nick Hudson
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+
+include <sys/types.h>
+include <ucontext.h>
+
+define _REG_PCOQH      _REG_PCOQH
+define _REG_PCOQT      _REG_PCOQT
+define _REG_RET0       _REG_RET0
+
+define _OFFSETOF_UC_GREGS      offsetof(ucontext_t, uc_mcontext.__gregs[0])
diff -r 86df3e358b57 -r 602932f8271c lib/libc/arch/hppa/sys/getcontext.S
--- a/lib/libc/arch/hppa/sys/getcontext.S       Wed Feb 19 12:28:38 2014 +0000
+++ b/lib/libc/arch/hppa/sys/getcontext.S       Wed Feb 19 13:01:51 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: getcontext.S,v 1.4 2008/04/28 20:22:56 martin Exp $    */
+/*     $NetBSD: getcontext.S,v 1.5 2014/02/19 13:01:51 skrll Exp $     */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -29,17 +29,13 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/errno.h>
-#include <machine/mcontext.h>
 #include "SYS.h"
+#include "assym.h"
 
 #ifdef WEAK_ALIAS
 WEAK_ALIAS(getcontext, _getcontext)
 #endif
 
-#define _OFFSETOF_UC_GREGS (10 * 4)
-#define SZREG 4
-
 ENTRY(_getcontext, 0)
        SYSCALL(getcontext)
        stw     %rp, (_OFFSETOF_UC_GREGS + _REG_PCOQH * SZREG)(%arg0)
diff -r 86df3e358b57 -r 602932f8271c sys/arch/hppa/include/mcontext.h
--- a/sys/arch/hppa/include/mcontext.h  Wed Feb 19 12:28:38 2014 +0000
+++ b/sys/arch/hppa/include/mcontext.h  Wed Feb 19 13:01:51 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mcontext.h,v 1.7 2011/12/08 21:00:50 skrll Exp $       */
+/*     $NetBSD: mcontext.h,v 1.8 2014/02/19 13:01:51 skrll Exp $       */
 
 #ifndef _HPPA_MCONTEXT_H_
 #define        _HPPA_MCONTEXT_H_
@@ -69,8 +69,6 @@
 
 #endif /* !__ASSEMBLER__ */
 
-#define        _OFFSETOF_UC_GREGS 40
-
 #define        _UC_SETSTACK    0x00010000
 #define        _UC_CLRSTACK    0x00020000
 #define        _UC_TLSBASE     0x00040000



Home | Main Index | Thread Index | Old Index