CVS commit: src/lib/libc/arch/hppa/gen

2010-01-07 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Jan  7 12:31:10 UTC 2010

Modified Files:
src/lib/libc/arch/hppa/gen: _lwp.c

Log Message:
Deal with PLABELs in _lwp_makecontext


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/lib/libc/arch/hppa/gen/_lwp.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/arch/hppa/gen/_lwp.c
diff -u src/lib/libc/arch/hppa/gen/_lwp.c:1.3 src/lib/libc/arch/hppa/gen/_lwp.c:1.4
--- src/lib/libc/arch/hppa/gen/_lwp.c:1.3	Mon Apr 28 20:22:56 2008
+++ src/lib/libc/arch/hppa/gen/_lwp.c	Thu Jan  7 12:31:10 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: _lwp.c,v 1.3 2008/04/28 20:22:56 martin Exp $	*/
+/*	$NetBSD: _lwp.c,v 1.4 2010/01/07 12:31:10 skrll Exp $	*/
 
 /*
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include 
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: _lwp.c,v 1.3 2008/04/28 20:22:56 martin Exp $");
+__RCSID("$NetBSD: _lwp.c,v 1.4 2010/01/07 12:31:10 skrll Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include "namespace.h"
@@ -47,6 +47,8 @@
 {
 	caddr_t sp;
 	__greg_t *gr;
+	__greg_t *gp;
+	__greg_t fp;
 
 	getcontext(u);
 	gr = u->uc_mcontext.__gregs;
@@ -56,8 +58,14 @@
 	u->uc_stack.ss_size = stack_size;
 	sp = stack_base + HPPA_FRAME_SIZE;
 
-	gr[_REG_PCOQH] = (__greg_t) start;
-	gr[_REG_PCOQT] = (__greg_t) start + 4;
+	fp = (__greg_t)start;
+	if (fp & 2) {
+		gp = (__greg_t *)(fp & ~3);
+		fp = gp[0];
+		gr[_REG_R19] = gp[1];
+	}
+	gr[_REG_PCOQH] = fp | HPPA_PC_PRIV_USER;
+	gr[_REG_PCOQT] = (fp + 4) | HPPA_PC_PRIV_USER;
 	gr[_REG_RP] = (__greg_t) _lwp_exit;
 	gr[_REG_ARG0] = (__greg_t) arg;
 	gr[_REG_SP] = (__greg_t) sp;



CVS commit: src/lib/libc/arch/hppa/gen

2012-03-22 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Mar 22 12:31:32 UTC 2012

Modified Files:
src/lib/libc/arch/hppa/gen: __longjmp14.c makecontext.c

Log Message:
Shut lint up about dp.

>From he@


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/lib/libc/arch/hppa/gen/__longjmp14.c
cvs rdiff -u -r1.5 -r1.6 src/lib/libc/arch/hppa/gen/makecontext.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/arch/hppa/gen/__longjmp14.c
diff -u src/lib/libc/arch/hppa/gen/__longjmp14.c:1.4 src/lib/libc/arch/hppa/gen/__longjmp14.c:1.5
--- src/lib/libc/arch/hppa/gen/__longjmp14.c:1.4	Mon Apr 28 20:22:55 2008
+++ src/lib/libc/arch/hppa/gen/__longjmp14.c	Thu Mar 22 12:31:32 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: __longjmp14.c,v 1.4 2008/04/28 20:22:55 martin Exp $	*/
+/*	$NetBSD: __longjmp14.c,v 1.5 2012/03/22 12:31:32 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -81,6 +81,7 @@ __longjmp14(jmp_buf env, int val)
 	uc.uc_mcontext.__gregs[18] = regs[18];
 
 	/* Preserve the current value of DP */
+	/* LINTED dp is r27, so is "initialized" */
 	uc.uc_mcontext.__gregs[27] = dp;
 
 	/* Set the desired return value. */

Index: src/lib/libc/arch/hppa/gen/makecontext.c
diff -u src/lib/libc/arch/hppa/gen/makecontext.c:1.5 src/lib/libc/arch/hppa/gen/makecontext.c:1.6
--- src/lib/libc/arch/hppa/gen/makecontext.c:1.5	Tue Sep 20 08:42:29 2011
+++ src/lib/libc/arch/hppa/gen/makecontext.c	Thu Mar 22 12:31:32 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: makecontext.c,v 1.5 2011/09/20 08:42:29 joerg Exp $	*/
+/*	$NetBSD: makecontext.c,v 1.6 2012/03/22 12:31:32 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include 
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: makecontext.c,v 1.5 2011/09/20 08:42:29 joerg Exp $");
+__RCSID("$NetBSD: makecontext.c,v 1.6 2012/03/22 12:31:32 skrll Exp $");
 #endif
 
 #include 
@@ -81,6 +81,7 @@ makecontext(ucontext_t *ucp, void (*func
 	}
 	gr[_REG_PCOQH] = fp | HPPA_PC_PRIV_USER;
 	gr[_REG_PCOQT] = (fp + 4) | HPPA_PC_PRIV_USER;
+	/* LINTED dp is reg27, ref. above, so initialized */
 	gr[_REG_DP] = dp;
 
 	/* Construct argument list. */



CVS commit: src/lib/libc/arch/hppa/gen

2012-03-23 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Mar 23 09:34:10 UTC 2012

Modified Files:
src/lib/libc/arch/hppa/gen: flt_rounds.c fpgetmask.c fpgetround.c
fpgetsticky.c fpsetmask.c fpsetround.c fpsetsticky.c

Log Message:
Shut lint up.

>From he@


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/lib/libc/arch/hppa/gen/flt_rounds.c \
src/lib/libc/arch/hppa/gen/fpgetmask.c \
src/lib/libc/arch/hppa/gen/fpgetround.c \
src/lib/libc/arch/hppa/gen/fpgetsticky.c
cvs rdiff -u -r1.5 -r1.6 src/lib/libc/arch/hppa/gen/fpsetmask.c \
src/lib/libc/arch/hppa/gen/fpsetround.c \
src/lib/libc/arch/hppa/gen/fpsetsticky.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/arch/hppa/gen/flt_rounds.c
diff -u src/lib/libc/arch/hppa/gen/flt_rounds.c:1.4 src/lib/libc/arch/hppa/gen/flt_rounds.c:1.5
--- src/lib/libc/arch/hppa/gen/flt_rounds.c:1.4	Sat Dec 24 21:42:32 2005
+++ src/lib/libc/arch/hppa/gen/flt_rounds.c	Fri Mar 23 09:34:09 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: flt_rounds.c,v 1.4 2005/12/24 21:42:32 perry Exp $	*/
+/*	$NetBSD: flt_rounds.c,v 1.5 2012/03/23 09:34:09 skrll Exp $	*/
 
 /*	$OpenBSD: flt_rounds.c,v 1.3 2002/10/21 18:41:05 mickey Exp $	*/
 
@@ -8,7 +8,7 @@
 
 #include 
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: flt_rounds.c,v 1.4 2005/12/24 21:42:32 perry Exp $");
+__RCSID("$NetBSD: flt_rounds.c,v 1.5 2012/03/23 09:34:09 skrll Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include 
@@ -27,5 +27,5 @@ __flt_rounds(void)
 	uint64_t fpsr;
 
 	__asm volatile("fstd %%fr0,0(%1)" : "=m" (fpsr) : "r" (&fpsr));
-	return map[(fpsr >> 41) & 0x03];
+	return map[(unsigned int)(fpsr >> 41) & 0x03];
 }
Index: src/lib/libc/arch/hppa/gen/fpgetmask.c
diff -u src/lib/libc/arch/hppa/gen/fpgetmask.c:1.4 src/lib/libc/arch/hppa/gen/fpgetmask.c:1.5
--- src/lib/libc/arch/hppa/gen/fpgetmask.c:1.4	Sat Dec 24 21:42:32 2005
+++ src/lib/libc/arch/hppa/gen/fpgetmask.c	Fri Mar 23 09:34:09 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: fpgetmask.c,v 1.4 2005/12/24 21:42:32 perry Exp $	*/
+/*	$NetBSD: fpgetmask.c,v 1.5 2012/03/23 09:34:09 skrll Exp $	*/
 
 /*	$OpenBSD: fpgetmask.c,v 1.3 2002/10/21 18:41:05 mickey Exp $	*/
 
@@ -8,7 +8,7 @@
 
 #include 
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: fpgetmask.c,v 1.4 2005/12/24 21:42:32 perry Exp $");
+__RCSID("$NetBSD: fpgetmask.c,v 1.5 2012/03/23 09:34:09 skrll Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include 
@@ -20,5 +20,5 @@ fpgetmask(void)
 	uint64_t fpsr;
 
 	__asm volatile("fstd %%fr0,0(%1)" : "=m" (fpsr) : "r" (&fpsr));
-	return ((fpsr >> 32) & 0x1f);
+	return ((fp_except)(fpsr >> 32) & 0x1f);
 }
Index: src/lib/libc/arch/hppa/gen/fpgetround.c
diff -u src/lib/libc/arch/hppa/gen/fpgetround.c:1.4 src/lib/libc/arch/hppa/gen/fpgetround.c:1.5
--- src/lib/libc/arch/hppa/gen/fpgetround.c:1.4	Sat Dec 24 21:42:32 2005
+++ src/lib/libc/arch/hppa/gen/fpgetround.c	Fri Mar 23 09:34:09 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: fpgetround.c,v 1.4 2005/12/24 21:42:32 perry Exp $	*/
+/*	$NetBSD: fpgetround.c,v 1.5 2012/03/23 09:34:09 skrll Exp $	*/
 
 /*	$OpenBSD: fpgetround.c,v 1.3 2002/10/21 18:41:05 mickey Exp $	*/
 
@@ -8,7 +8,7 @@
 
 #include 
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: fpgetround.c,v 1.4 2005/12/24 21:42:32 perry Exp $");
+__RCSID("$NetBSD: fpgetround.c,v 1.5 2012/03/23 09:34:09 skrll Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include 
@@ -20,5 +20,5 @@ fpgetround(void)
 	uint64_t fpsr;
 
 	__asm volatile("fstd %%fr0,0(%1)" : "=m" (fpsr) : "r" (&fpsr));
-	return ((fpsr >> 41) & 0x3);
+	return ((fp_rnd)(fpsr >> 41) & 0x3);
 }
Index: src/lib/libc/arch/hppa/gen/fpgetsticky.c
diff -u src/lib/libc/arch/hppa/gen/fpgetsticky.c:1.4 src/lib/libc/arch/hppa/gen/fpgetsticky.c:1.5
--- src/lib/libc/arch/hppa/gen/fpgetsticky.c:1.4	Sat Dec 24 21:42:32 2005
+++ src/lib/libc/arch/hppa/gen/fpgetsticky.c	Fri Mar 23 09:34:09 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: fpgetsticky.c,v 1.4 2005/12/24 21:42:32 perry Exp $	*/
+/*	$NetBSD: fpgetsticky.c,v 1.5 2012/03/23 09:34:09 skrll Exp $	*/
 
 /*	$OpenBSD: fpgetsticky.c,v 1.3 2002/10/21 18:41:05 mickey Exp $	*/
 
@@ -8,7 +8,7 @@
 
 #include 
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: fpgetsticky.c,v 1.4 2005/12/24 21:42:32 perry Exp $");
+__RCSID("$NetBSD: fpgetsticky.c,v 1.5 2012/03/23 09:34:09 skrll Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include 
@@ -20,5 +20,5 @@ fpgetsticky(void)
 	uint64_t fpsr;
 
 	__asm volatile("fstd %%fr0,0(%1)" : "=m" (fpsr) : "r" (&fpsr));
-	return ((fpsr >> 59) & 0x1f);
+	return ((fp_except)(fpsr >> 59) & 0x1f);
 }

Index: src/lib/libc/arch/hppa/gen/fpsetmask.c
diff -u src/lib/libc/arch/hppa/gen/fpsetmask.c:1.5 src/lib/libc/arch/hppa/gen/fpsetmask.c:1.6
--- src/lib/libc/arch/hppa/gen/fpsetmask.c:1.5	Sun Jan 25 16:44:41 2009
+++ src/lib/libc/arch/hppa/gen/fpsetmask.c	Fri Mar 23 09:34:09 2012
@@ -1,4 +1,

CVS commit: src/lib/libc/arch/hppa/gen

2016-07-16 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Jul 16 09:51:13 UTC 2016

Modified Files:
src/lib/libc/arch/hppa/gen: __setjmp14.S

Log Message:
No need to define PSW_MBS as machine/psl.h provides it for us


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/lib/libc/arch/hppa/gen/__setjmp14.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/arch/hppa/gen/__setjmp14.S
diff -u src/lib/libc/arch/hppa/gen/__setjmp14.S:1.5 src/lib/libc/arch/hppa/gen/__setjmp14.S:1.6
--- src/lib/libc/arch/hppa/gen/__setjmp14.S:1.5	Mon Apr 28 20:22:55 2008
+++ src/lib/libc/arch/hppa/gen/__setjmp14.S	Sat Jul 16 09:51:13 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: __setjmp14.S,v 1.5 2008/04/28 20:22:55 martin Exp $	*/
+/*	$NetBSD: __setjmp14.S,v 1.6 2016/07/16 09:51:13 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
 #include 
 
 #if defined(LIBC_SCCS) && !defined(lint)
-	RCSID("$NetBSD: __setjmp14.S,v 1.5 2008/04/28 20:22:55 martin Exp $")
+	RCSID("$NetBSD: __setjmp14.S,v 1.6 2016/07/16 09:51:13 skrll Exp $")
 #endif /* LIBC_SCCS and not lint */
 
 /*
@@ -66,7 +66,6 @@ ENTRY(__setjmp14,0)
 	stw	%r1, 28(%arg0)		; sc.sc_pcsqh = %sr0
 	ldo	4(%rp), %r1
 	stw	%r1, 32(%arg0)		; sc.sc_pcoqt = %rp + 4
-#define PSW_MBS (PSW_C|PSW_Q|PSW_P|PSW_D|PSW_I)
 	ldil	L%PSW_MBS, %r1
 	ldo	R%PSW_MBS(%r1), %r1
 	stw	%r1, 36(%arg0)		; set sc.sc_ps



CVS commit: src/lib/libc/arch/hppa/gen

2016-01-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jan 25 16:44:42 UTC 2016

Modified Files:
src/lib/libc/arch/hppa/gen: __longjmp14.c

Log Message:
use __register_t


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/lib/libc/arch/hppa/gen/__longjmp14.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/arch/hppa/gen/__longjmp14.c
diff -u src/lib/libc/arch/hppa/gen/__longjmp14.c:1.5 src/lib/libc/arch/hppa/gen/__longjmp14.c:1.6
--- src/lib/libc/arch/hppa/gen/__longjmp14.c:1.5	Thu Mar 22 08:31:32 2012
+++ src/lib/libc/arch/hppa/gen/__longjmp14.c	Mon Jan 25 11:44:42 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: __longjmp14.c,v 1.5 2012/03/22 12:31:32 skrll Exp $	*/
+/*	$NetBSD: __longjmp14.c,v 1.6 2016/01/25 16:44:42 christos Exp $	*/
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -50,8 +50,8 @@ __longjmp14(jmp_buf env, int val)
 {
 	ucontext_t uc;
 	struct sigcontext *sc = (void *)env;
-	register_t *regs = (void *)(sc + 1);
-	register register_t dp __asm("r27");
+	__register_t *regs = (void *)(sc + 1);
+	register __register_t dp __asm("r27");
 
 	/* Ensure non-zero SP */
 	if (sc->sc_sp == 0)



CVS commit: src/lib/libc/arch/hppa/gen

2018-11-08 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu Nov  8 16:29:50 UTC 2018

Modified Files:
src/lib/libc/arch/hppa/gen: fabs.c

Log Message:
Try speling it rite, riasthradhdadhaa or whatever your name is.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/lib/libc/arch/hppa/gen/fabs.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/arch/hppa/gen/fabs.c
diff -u src/lib/libc/arch/hppa/gen/fabs.c:1.5 src/lib/libc/arch/hppa/gen/fabs.c:1.6
--- src/lib/libc/arch/hppa/gen/fabs.c:1.5	Wed Nov  7 22:21:42 2018
+++ src/lib/libc/arch/hppa/gen/fabs.c	Thu Nov  8 16:29:50 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: fabs.c,v 1.5 2018/11/07 22:21:42 riastradh Exp $	*/
+/*	$NetBSD: fabs.c,v 1.6 2018/11/08 16:29:50 riastradh Exp $	*/
 
 /*	$OpenBSD: fabs.c,v 1.3 2002/10/21 18:41:05 mickey Exp $	*/
 
@@ -11,7 +11,7 @@
 #include 
 
 #ifndef __HAVE_LONG_DOUBLE
-__strong_alias(fasbl, fabs)
+__strong_alias(fabsl, fabs)
 #endif
 
 double



CVS commit: src/lib/libc/arch/hppa/gen

2020-05-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon May  4 06:42:11 UTC 2020

Modified Files:
src/lib/libc/arch/hppa/gen: __setjmp14.S _setjmp.S

Log Message:
Remove unnecesary #define/#undef _LOCORE


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/lib/libc/arch/hppa/gen/__setjmp14.S
cvs rdiff -u -r1.4 -r1.5 src/lib/libc/arch/hppa/gen/_setjmp.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/arch/hppa/gen/__setjmp14.S
diff -u src/lib/libc/arch/hppa/gen/__setjmp14.S:1.7 src/lib/libc/arch/hppa/gen/__setjmp14.S:1.8
--- src/lib/libc/arch/hppa/gen/__setjmp14.S:1.7	Sun May  3 15:29:22 2020
+++ src/lib/libc/arch/hppa/gen/__setjmp14.S	Mon May  4 06:42:11 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: __setjmp14.S,v 1.7 2020/05/03 15:29:22 skrll Exp $	*/
+/*	$NetBSD: __setjmp14.S,v 1.8 2020/05/04 06:42:11 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -30,14 +30,11 @@
  */
 
 #include 
-/* XXX fredette - this is awful */
-#define _LOCORE
 #include 
-#undef _LOCORE
 #include 
 
 #if defined(LIBC_SCCS) && !defined(lint)
-	RCSID("$NetBSD: __setjmp14.S,v 1.7 2020/05/03 15:29:22 skrll Exp $")
+	RCSID("$NetBSD: __setjmp14.S,v 1.8 2020/05/04 06:42:11 skrll Exp $")
 #endif /* LIBC_SCCS and not lint */
 
 /*

Index: src/lib/libc/arch/hppa/gen/_setjmp.S
diff -u src/lib/libc/arch/hppa/gen/_setjmp.S:1.4 src/lib/libc/arch/hppa/gen/_setjmp.S:1.5
--- src/lib/libc/arch/hppa/gen/_setjmp.S:1.4	Mon Apr 28 20:22:56 2008
+++ src/lib/libc/arch/hppa/gen/_setjmp.S	Mon May  4 06:42:11 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: _setjmp.S,v 1.4 2008/04/28 20:22:56 martin Exp $	*/
+/*	$NetBSD: _setjmp.S,v 1.5 2020/05/04 06:42:11 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -30,13 +30,10 @@
  */
 
 #include 
-/* XXX fredette - this is awful */
-#define _LOCORE
 #include 
-#undef _LOCORE
 
 #if defined(LIBC_SCCS) && !defined(lint)
-	RCSID("$NetBSD: _setjmp.S,v 1.4 2008/04/28 20:22:56 martin Exp $")
+	RCSID("$NetBSD: _setjmp.S,v 1.5 2020/05/04 06:42:11 skrll Exp $")
 #endif /* LIBC_SCCS and not lint */
 
 /*