Libc update to simplify merge.
Bumping libc files for unsupported architectures, to simplify merging. A bunch of small fixes: * in libutil update * the macro in endian.h * some undefined types due to clear separation from host. * Fix a warning for cdbr.c Some modification which were required for the new build system: * inclusion path for const.h in sconst, still hacky * Removed default malloc.c which conflicts on some occasions.
This commit is contained in:
@@ -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. */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: _lwp.c,v 1.4 2010/01/07 12:31:10 skrll Exp $ */
|
||||
/* $NetBSD: _lwp.c,v 1.5 2011/02/24 04:28:42 joerg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001 The NetBSD Foundation, Inc.
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
__RCSID("$NetBSD: _lwp.c,v 1.4 2010/01/07 12:31:10 skrll Exp $");
|
||||
__RCSID("$NetBSD: _lwp.c,v 1.5 2011/02/24 04:28:42 joerg Exp $");
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include "namespace.h"
|
||||
@@ -69,4 +69,5 @@ _lwp_makecontext(ucontext_t *u, void (*start)(void *),
|
||||
gr[_REG_RP] = (__greg_t) _lwp_exit;
|
||||
gr[_REG_ARG0] = (__greg_t) arg;
|
||||
gr[_REG_SP] = (__greg_t) sp;
|
||||
gr[_REG_CR27] = (__greg_t) private;
|
||||
}
|
||||
|
||||
@@ -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 <sys/cdefs.h>
|
||||
#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 <sys/types.h>
|
||||
@@ -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];
|
||||
}
|
||||
|
||||
@@ -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 <sys/cdefs.h>
|
||||
#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 <sys/types.h>
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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 <sys/cdefs.h>
|
||||
#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 <sys/types.h>
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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 <sys/cdefs.h>
|
||||
#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 <sys/types.h>
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: fpsetmask.c,v 1.5 2009/01/25 16:44:41 skrll Exp $ */
|
||||
/* $NetBSD: fpsetmask.c,v 1.6 2012/03/23 09:34:09 skrll Exp $ */
|
||||
|
||||
/* $OpenBSD: fpsetmask.c,v 1.4 2004/01/05 06:06:16 otto Exp $ */
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
__RCSID("$NetBSD: fpsetmask.c,v 1.5 2009/01/25 16:44:41 skrll Exp $");
|
||||
__RCSID("$NetBSD: fpsetmask.c,v 1.6 2012/03/23 09:34:09 skrll Exp $");
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include <sys/types.h>
|
||||
@@ -21,7 +21,7 @@ fpsetmask(fp_except mask)
|
||||
fp_except old;
|
||||
|
||||
__asm volatile("fstd %%fr0,0(%1)" : "=m"(fpsr) : "r"(&fpsr) : "memory");
|
||||
old = (fpsr >> 32) & 0x1f;
|
||||
old = (fp_except)(fpsr >> 32) & 0x1f;
|
||||
fpsr = (fpsr & 0xffffffe000000000LL) | ((uint64_t)(mask & 0x1f) << 32);
|
||||
__asm volatile("fldd 0(%0),%%fr0" : : "r"(&fpsr) : "memory");
|
||||
return (old);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: fpsetround.c,v 1.5 2009/01/25 16:44:41 skrll Exp $ */
|
||||
/* $NetBSD: fpsetround.c,v 1.6 2012/03/23 09:34:09 skrll Exp $ */
|
||||
|
||||
/* $OpenBSD: fpsetround.c,v 1.3 2002/10/21 18:41:05 mickey Exp $ */
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
__RCSID("$NetBSD: fpsetround.c,v 1.5 2009/01/25 16:44:41 skrll Exp $");
|
||||
__RCSID("$NetBSD: fpsetround.c,v 1.6 2012/03/23 09:34:09 skrll Exp $");
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include <sys/types.h>
|
||||
@@ -21,7 +21,7 @@ fpsetround(fp_rnd rnd_dir)
|
||||
fp_rnd old;
|
||||
|
||||
__asm volatile("fstd %%fr0,0(%1)" : "=m" (fpsr) : "r" (&fpsr) : "memory");
|
||||
old = (fpsr >> 41) & 0x03;
|
||||
old = (fp_rnd)(fpsr >> 41) & 0x03;
|
||||
fpsr = (fpsr & 0xfffff9ff00000000LL) |
|
||||
((uint64_t)(rnd_dir & 0x03) << 41);
|
||||
__asm volatile("fldd 0(%0),%%fr0" : : "r" (&fpsr) : "memory");
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: fpsetsticky.c,v 1.5 2009/01/25 16:44:41 skrll Exp $ */
|
||||
/* $NetBSD: fpsetsticky.c,v 1.6 2012/03/23 09:34:09 skrll Exp $ */
|
||||
|
||||
/* $OpenBSD: fpsetsticky.c,v 1.4 2004/01/05 06:06:16 otto Exp $ */
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
__RCSID("$NetBSD: fpsetsticky.c,v 1.5 2009/01/25 16:44:41 skrll Exp $");
|
||||
__RCSID("$NetBSD: fpsetsticky.c,v 1.6 2012/03/23 09:34:09 skrll Exp $");
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include <sys/types.h>
|
||||
@@ -21,7 +21,7 @@ fpsetsticky(fp_except mask)
|
||||
fp_except old;
|
||||
|
||||
__asm volatile("fstd %%fr0,0(%1)" : "=m" (fpsr) : "r" (&fpsr) : "memory");
|
||||
old = (fpsr >> 59) & 0x1f;
|
||||
old = (fp_except)(fpsr >> 59) & 0x1f;
|
||||
fpsr = (fpsr & 0x07ffffff00000000LL) | ((uint64_t)(mask & 0x1f) << 59);
|
||||
__asm volatile("fldd 0(%0),%%fr0" : : "r" (&fpsr) : "memory");
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: makecontext.c,v 1.3 2008/04/28 20:22:56 martin 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 <sys/cdefs.h>
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
__RCSID("$NetBSD: makecontext.c,v 1.3 2008/04/28 20:22:56 martin Exp $");
|
||||
__RCSID("$NetBSD: makecontext.c,v 1.6 2012/03/22 12:31:32 skrll Exp $");
|
||||
#endif
|
||||
|
||||
#include <inttypes.h>
|
||||
@@ -44,6 +44,8 @@ __RCSID("$NetBSD: makecontext.c,v 1.3 2008/04/28 20:22:56 martin Exp $");
|
||||
#include <sys/types.h>
|
||||
#include <machine/frame.h>
|
||||
|
||||
void __resumecontext(void) __dead;
|
||||
|
||||
void
|
||||
makecontext(ucontext_t *ucp, void (*func)(void), int argc, ...)
|
||||
{
|
||||
@@ -54,8 +56,6 @@ makecontext(ucontext_t *ucp, void (*func)(void), int argc, ...)
|
||||
int i;
|
||||
va_list ap;
|
||||
|
||||
void __resumecontext(void);
|
||||
|
||||
/* LINTED uintptr_t is safe */
|
||||
sp = (uintptr_t *)ucp->uc_stack.ss_sp;
|
||||
/* LINTED uintptr_t is safe */
|
||||
@@ -81,6 +81,7 @@ makecontext(ucontext_t *ucp, void (*func)(void), int argc, ...)
|
||||
}
|
||||
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. */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: resumecontext.c,v 1.3 2008/04/28 20:22:56 martin Exp $ */
|
||||
/* $NetBSD: resumecontext.c,v 1.4 2011/09/19 21:24:57 joerg Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2001 The NetBSD Foundation, Inc.
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
__RCSID("$NetBSD: resumecontext.c,v 1.3 2008/04/28 20:22:56 martin Exp $");
|
||||
__RCSID("$NetBSD: resumecontext.c,v 1.4 2011/09/19 21:24:57 joerg Exp $");
|
||||
#endif
|
||||
|
||||
#include "namespace.h"
|
||||
@@ -41,7 +41,7 @@ __RCSID("$NetBSD: resumecontext.c,v 1.3 2008/04/28 20:22:56 martin Exp $");
|
||||
#include "extern.h"
|
||||
|
||||
void
|
||||
_resumecontext()
|
||||
_resumecontext(void)
|
||||
{
|
||||
ucontext_t uct;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: swapcontext.S,v 1.4 2008/04/28 20:22:56 martin Exp $ */
|
||||
/* $NetBSD: swapcontext.S,v 1.5 2012/09/12 02:00:52 manu Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2001 The NetBSD Foundation, Inc.
|
||||
@@ -33,7 +33,7 @@
|
||||
#include <machine/mcontext.h>
|
||||
|
||||
#if defined(SYSLIBC_SCCS) && !defined(lint)
|
||||
RCSID("$NetBSD: swapcontext.S,v 1.4 2008/04/28 20:22:56 martin Exp $")
|
||||
RCSID("$NetBSD: swapcontext.S,v 1.5 2012/09/12 02:00:52 manu Exp $")
|
||||
#endif /* SYSLIBC_SCCS && !lint */
|
||||
|
||||
LEAF_ENTRY(swapcontext)
|
||||
@@ -44,10 +44,15 @@ LEAF_ENTRY(swapcontext)
|
||||
|
||||
ldw HPPA_FRAME_ARG(0)(%sp), %arg1
|
||||
ldw HPPA_FRAME_ARG(1)(%sp), %arg0
|
||||
stw %r0, (_OFFSETOF_UC_GREGS + _REG_RET0 * SZREG)(%arg1)
|
||||
|
||||
ldw HPPA_FRAME_CRP(%sp), %rp
|
||||
ldo 4(%rp), %r1
|
||||
stw %r1, (_OFFSETOF_UC_GREGS + _REG_PCOQT * SZREG)(%arg1)
|
||||
stw %rp, (_OFFSETOF_UC_GREGS + _REG_PCOQH * SZREG)(%arg1)
|
||||
SYSCALL(setcontext)
|
||||
bl setcontext, %rp
|
||||
stw %r0, (_OFFSETOF_UC_GREGS + _REG_RET0 * SZREG)(%arg1)
|
||||
|
||||
ldw HPPA_FRAME_CRP(%sp), %rp
|
||||
bv,n %r0(%rp)
|
||||
EXIT(swapcontext)
|
||||
.end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: brk.S,v 1.4 2009/11/03 05:07:25 snj Exp $ */
|
||||
/* $NetBSD: brk.S,v 1.5 2012/03/14 14:18:10 skrll Exp $ */
|
||||
|
||||
/* $OpenBSD: brk.S,v 1.7 2001/06/04 23:14:04 mickey Exp $ */
|
||||
|
||||
@@ -31,11 +31,11 @@
|
||||
#include "SYS.h"
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
RCSID("$NetBSD: brk.S,v 1.4 2009/11/03 05:07:25 snj Exp $")
|
||||
RCSID("$NetBSD: brk.S,v 1.5 2012/03/14 14:18:10 skrll Exp $")
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
.import curbrk, data
|
||||
.import end, data
|
||||
.global _end
|
||||
|
||||
#ifdef WEAK_ALIAS
|
||||
WEAK_ALIAS(brk, _brk)
|
||||
@@ -44,7 +44,7 @@
|
||||
.data
|
||||
.export __minbrk, data
|
||||
__minbrk:
|
||||
.long end
|
||||
.long _end
|
||||
|
||||
ENTRY(_brk,0)
|
||||
#ifdef PIC
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: sbrk.S,v 1.4 2009/11/03 05:07:25 snj Exp $ */
|
||||
/* $NetBSD: sbrk.S,v 1.5 2012/03/14 14:18:10 skrll Exp $ */
|
||||
|
||||
/* $OpenBSD: sbrk.S,v 1.7 2001/06/04 23:14:04 mickey Exp $ */
|
||||
|
||||
@@ -31,10 +31,10 @@
|
||||
#include "SYS.h"
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
RCSID("$NetBSD: sbrk.S,v 1.4 2009/11/03 05:07:25 snj Exp $")
|
||||
RCSID("$NetBSD: sbrk.S,v 1.5 2012/03/14 14:18:10 skrll Exp $")
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
.import end, data
|
||||
.global _end
|
||||
|
||||
#ifdef WEAK_ALIAS
|
||||
WEAK_ALIAS(sbrk, _sbrk)
|
||||
@@ -43,7 +43,7 @@
|
||||
.data
|
||||
.export curbrk, data
|
||||
curbrk:
|
||||
.long end
|
||||
.long _end
|
||||
|
||||
ENTRY(_sbrk,0)
|
||||
#ifdef PIC
|
||||
|
||||
Reference in New Issue
Block a user