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: __clone.S,v 1.3 2008/04/28 20:22:58 martin Exp $ */
|
||||
/* $NetBSD: __clone.S,v 1.4 2011/01/25 02:38:15 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2001 The NetBSD Foundation, Inc.
|
||||
@@ -33,6 +33,10 @@
|
||||
|
||||
#include "SYS.h"
|
||||
|
||||
#ifdef SYSLIBC_SCCS
|
||||
RCSID("$NetBSD: __clone.S,v 1.4 2011/01/25 02:38:15 matt Exp $")
|
||||
#endif
|
||||
|
||||
#ifdef WEAK_ALIAS
|
||||
WEAK_ALIAS(clone, __clone)
|
||||
#endif
|
||||
@@ -74,3 +78,4 @@ ENTRY(__clone, 0)
|
||||
|
||||
9: movl $EINVAL,%r0
|
||||
jmp CERROR+2
|
||||
END(__clone)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: __sigtramp3.S,v 1.1 2003/09/30 19:05:41 matt Exp $ */
|
||||
/* $NetBSD: __sigtramp3.S,v 1.2 2011/01/25 02:38:15 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2003 Matt Thomas <matt@3am-software.com>
|
||||
@@ -39,11 +39,16 @@
|
||||
|
||||
#include "SYS.h"
|
||||
|
||||
#ifdef SYSLIBC_SCCS
|
||||
RCSID("$NetBSD: __sigtramp3.S,v 1.2 2011/01/25 02:38:15 matt Exp $")
|
||||
#endif
|
||||
|
||||
.text
|
||||
_ALIGN_TEXT
|
||||
|
||||
.globl _C_LABEL(__sigtramp_siginfo_3)
|
||||
_C_LABEL(__sigtramp_siginfo_3):
|
||||
nop; nop
|
||||
callg (%ap),(%fp) # use global arg list
|
||||
addl2 $8,%ap # arg is pointer to ucontext
|
||||
SYSTRAP(setcontext) # exit from here
|
||||
|
||||
@@ -32,13 +32,13 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "SYS.h"
|
||||
|
||||
#if defined(SYSLIBC_SCCS) && !defined(lint)
|
||||
/* .asciz "@(#)syscall.s 8.2 (Berkeley) 1/21/94" */
|
||||
.asciz "$NetBSD: __syscall.S,v 1.3 2003/08/07 16:42:33 agc Exp $"
|
||||
RCSID("$NetBSD: __syscall.S,v 1.4 2011/01/25 02:38:15 matt Exp $")
|
||||
#endif /* SYSLIBC_SCCS and not lint */
|
||||
|
||||
#include "SYS.h"
|
||||
|
||||
ENTRY(__syscall, 0)
|
||||
movl 4(%ap),%r0 # syscall number
|
||||
addl2 $8,%ap # skip the first argument
|
||||
@@ -48,3 +48,4 @@ ENTRY(__syscall, 0)
|
||||
ret
|
||||
1:
|
||||
jmp CERROR+2
|
||||
END(__syscall)
|
||||
|
||||
@@ -27,9 +27,11 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "SYS.h"
|
||||
|
||||
#if defined(SYSLIBC_SCCS) && !defined(lint)
|
||||
/* .asciz "@(#)Ovfork.s 8.1 (Berkeley) 6/4/93" */
|
||||
.asciz "$NetBSD: __vfork14.S,v 1.5 2003/08/07 16:42:33 agc Exp $"
|
||||
RCSID("$NetBSD: __vfork14.S,v 1.7 2011/11/21 16:17:48 chs Exp $")
|
||||
#endif /* SYSLIBC_SCCS and not lint */
|
||||
|
||||
/*
|
||||
@@ -37,8 +39,6 @@
|
||||
* C library -- vfork
|
||||
*/
|
||||
|
||||
#include "SYS.h"
|
||||
|
||||
/*
|
||||
* pid = vfork();
|
||||
*
|
||||
@@ -51,10 +51,11 @@
|
||||
*/
|
||||
|
||||
ENTRY(__vfork14, 0)
|
||||
movl 16(%fp),%r2 # save return address before we smash it
|
||||
movl 16(%fp),%r0 # save return address before we smash it
|
||||
movab here,16(%fp)
|
||||
ret
|
||||
here:
|
||||
movl %r0,%r2
|
||||
chmk $ SYS___vfork14
|
||||
bcs err # if failed, set errno and return -1
|
||||
/* this next trick is Chris Torek's fault */
|
||||
@@ -74,3 +75,4 @@ err:
|
||||
mnegl $1,%r0
|
||||
jmp (%r2)
|
||||
#endif
|
||||
END(__vfork14)
|
||||
|
||||
@@ -27,13 +27,13 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "SYS.h"
|
||||
|
||||
#if defined(SYSLIBC_SCCS) && !defined(lint)
|
||||
/* .asciz "@(#)brk.s 8.1 (Berkeley) 6/4/93" */
|
||||
.asciz "$NetBSD: brk.S,v 1.12 2003/12/26 11:21:48 martin Exp $"
|
||||
RCSID("$NetBSD: brk.S,v 1.13 2011/01/25 02:38:15 matt Exp $")
|
||||
#endif /* SYSLIBC_SCCS and not lint */
|
||||
|
||||
#include "SYS.h"
|
||||
|
||||
.globl CURBRK
|
||||
.globl _C_LABEL(__minbrk)
|
||||
|
||||
@@ -52,3 +52,4 @@ ENTRY(_brk, 0)
|
||||
ret
|
||||
err:
|
||||
jmp CERROR+2
|
||||
END(_brk)
|
||||
|
||||
@@ -27,15 +27,15 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#if defined(SYSLIBC_SCCS) && !defined(lint)
|
||||
/* .asciz "@(#)cerror.s 8.1 (Berkeley) 6/4/93" */
|
||||
.asciz "$NetBSD: cerror.S,v 1.8 2003/08/07 16:42:33 agc Exp $"
|
||||
#endif /* SYSLIBC_SCCS and not lint */
|
||||
|
||||
#include "SYS.h"
|
||||
|
||||
#if defined(SYSLIBC_SCCS) && !defined(lint)
|
||||
/* .asciz "@(#)cerror.s 8.1 (Berkeley) 6/4/93" */
|
||||
RCSID("$NetBSD: cerror.S,v 1.9 2011/01/25 02:38:15 matt Exp $")
|
||||
#endif /* SYSLIBC_SCCS and not lint */
|
||||
|
||||
.globl _C_LABEL(errno)
|
||||
CERROR: .word 0
|
||||
NENTRY(__cerror, 0)
|
||||
#ifdef _REENTRANT
|
||||
pushl %r0
|
||||
calls $0,_C_LABEL(__errno)
|
||||
@@ -46,3 +46,4 @@ CERROR: .word 0
|
||||
mnegl $1,%r0
|
||||
movl %r0,%r1
|
||||
ret
|
||||
END(__cerror)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: execl.S,v 1.3 2003/08/24 21:04:53 ragge Exp $ */
|
||||
/* $NetBSD: execl.S,v 1.4 2011/01/25 02:38:15 matt Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2001 Ludd, University of Lule}, Sweden. All rights reserved.
|
||||
*
|
||||
@@ -31,6 +31,10 @@
|
||||
|
||||
#include "SYS.h"
|
||||
|
||||
#ifdef SYSLIBC_SCCS
|
||||
RCSID("$NetBSD: execl.S,v 1.4 2011/01/25 02:38:15 matt Exp $")
|
||||
#endif
|
||||
|
||||
#ifdef WEAK_ALIAS
|
||||
WEAK_ALIAS(execl, _execl)
|
||||
#endif
|
||||
@@ -40,3 +44,4 @@ ENTRY(_execl, 0)
|
||||
pushl 4(%ap) # Push path
|
||||
calls $2,_C_LABEL(execv)
|
||||
ret
|
||||
END(_execl)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: execle.S,v 1.4 2003/08/24 21:04:53 ragge Exp $ */
|
||||
/* $NetBSD: execle.S,v 1.5 2011/01/25 02:38:15 matt Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2001 Ludd, University of Lule}, Sweden. All rights reserved.
|
||||
*
|
||||
@@ -31,6 +31,10 @@
|
||||
|
||||
#include "SYS.h"
|
||||
|
||||
#ifdef SYSLIBC_SCCS
|
||||
RCSID("$NetBSD: execle.S,v 1.5 2011/01/25 02:38:15 matt Exp $")
|
||||
#endif
|
||||
|
||||
#ifdef WEAK_ALIAS
|
||||
WEAK_ALIAS(execle, _execle)
|
||||
#endif
|
||||
@@ -42,3 +46,4 @@ ENTRY(_execle, 0)
|
||||
pushl 4(%ap) # Push path
|
||||
calls $3,_C_LABEL(execve)
|
||||
ret
|
||||
END(_execle)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: execlp.S,v 1.3 2003/08/24 21:04:53 ragge Exp $ */
|
||||
/* $NetBSD: execlp.S,v 1.4 2011/01/25 02:38:15 matt Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2001 Ludd, University of Lule}, Sweden. All rights reserved.
|
||||
*
|
||||
@@ -31,6 +31,10 @@
|
||||
|
||||
#include "SYS.h"
|
||||
|
||||
#ifdef SYSLIBC_SCCS
|
||||
RCSID("$NetBSD: execlp.S,v 1.4 2011/01/25 02:38:15 matt Exp $")
|
||||
#endif
|
||||
|
||||
#ifdef WEAK_ALIAS
|
||||
WEAK_ALIAS(execlp, _execlp)
|
||||
#endif
|
||||
@@ -40,3 +44,4 @@ ENTRY(_execlp, 0)
|
||||
pushl 4(%ap) # Push path
|
||||
calls $2,_C_LABEL(execvp)
|
||||
ret
|
||||
END(_execlp)
|
||||
|
||||
@@ -27,15 +27,16 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#if defined(SYSLIBC_SCCS) && !defined(lint)
|
||||
/* .asciz "@(#)exect.s 8.1 (Berkeley) 6/4/93" */
|
||||
.asciz "$NetBSD: exect.S,v 1.5 2003/08/07 16:42:33 agc Exp $"
|
||||
#endif /* SYSLIBC_SCCS and not lint */
|
||||
|
||||
#include "SYS.h"
|
||||
#include <machine/psl.h>
|
||||
|
||||
#if defined(SYSLIBC_SCCS) && !defined(lint)
|
||||
/* .asciz "@(#)exect.s 8.1 (Berkeley) 6/4/93" */
|
||||
RCSID("$NetBSD: exect.S,v 1.6 2011/01/25 02:38:15 matt Exp $")
|
||||
#endif /* SYSLIBC_SCCS and not lint */
|
||||
|
||||
ENTRY(exect, 0)
|
||||
bispsw $PSL_T
|
||||
chmk $ SYS_execve
|
||||
jmp CERROR+2 # exect(file, argv, env)
|
||||
END(exect)
|
||||
|
||||
@@ -27,15 +27,16 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "SYS.h"
|
||||
|
||||
#if defined(SYSLIBC_SCCS) && !defined(lint)
|
||||
/* .asciz "@(#)fork.s 8.1 (Berkeley) 6/4/93" */
|
||||
.asciz "$NetBSD: fork.S,v 1.5 2003/08/07 16:42:33 agc Exp $"
|
||||
RCSID("$NetBSD: fork.S,v 1.6 2011/01/25 02:38:15 matt Exp $")
|
||||
#endif /* SYSLIBC_SCCS and not lint */
|
||||
|
||||
#include "SYS.h"
|
||||
|
||||
_SYSCALL(__fork,fork)
|
||||
jlbc %r1,1f # parent, since %r1 == 0 in parent, 1 in child
|
||||
clrl %r0
|
||||
1:
|
||||
ret # pid = fork()
|
||||
END(__fork)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: getcontext.S,v 1.4 2008/04/28 20:22:58 martin Exp $ */
|
||||
/* $NetBSD: getcontext.S,v 1.6 2011/11/21 16:17:48 chs Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2003 The NetBSD Foundation, Inc.
|
||||
@@ -31,6 +31,10 @@
|
||||
|
||||
#include "SYS.h"
|
||||
|
||||
#ifdef SYSLIBC_SCCS
|
||||
RCSID("$NetBSD: getcontext.S,v 1.6 2011/11/21 16:17:48 chs Exp $")
|
||||
#endif
|
||||
|
||||
#ifdef WEAK_ALIAS
|
||||
WEAK_ALIAS(getcontext, _getcontext)
|
||||
#endif
|
||||
@@ -44,8 +48,8 @@ ENTRY(_getcontext, 0)
|
||||
jcc 1f
|
||||
jmp CERROR+2 /* badness happened */
|
||||
|
||||
1: movl 4(%ap),%r2 /* ptr to ucontext */
|
||||
movl 16(%fp),%r3 /* PC to return to */
|
||||
1: movl 4(%ap),%r0 /* ptr to ucontext */
|
||||
movl 16(%fp),%r1 /* PC to return to */
|
||||
movab 2f,16(%fp) /* let's return early */
|
||||
ret
|
||||
/*
|
||||
@@ -55,7 +59,9 @@ ENTRY(_getcontext, 0)
|
||||
* the callers state but we still have control.
|
||||
*/
|
||||
_ALIGN_TEXT
|
||||
2: movq %ap,(36+12*4)(%r2) /* adjust AP + SP */
|
||||
movl %fp,(36+14*4)(%r2) /* adjust FP */
|
||||
movl %r3,(36+15*4)(%r2) /* adjust PC */
|
||||
jmp (%r3) /* and return */
|
||||
2: movq %ap,(36+12*4)(%r0) /* adjust AP + SP */
|
||||
movl %fp,(36+14*4)(%r0) /* adjust FP */
|
||||
movl %r3,(36+15*4)(%r0) /* adjust PC */
|
||||
clrl %r0
|
||||
jmp (%r1) /* and return */
|
||||
END(_getcontext)
|
||||
|
||||
@@ -27,13 +27,13 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#if defined(SYSLIBC_SCCS) && !defined(lint)
|
||||
/* .asciz "@(#)pipe.s 8.1 (Berkeley) 6/4/93" */
|
||||
.asciz "$NetBSD: pipe.S,v 1.4 2003/08/07 16:42:33 agc Exp $"
|
||||
#endif /* SYSLIBC_SCCS and not lint */
|
||||
|
||||
#include "SYS.h"
|
||||
|
||||
#if defined(SYSLIBC_SCCS)
|
||||
/* .asciz "@(#)pipe.s 8.1 (Berkeley) 6/4/93" */
|
||||
RCSID("$NetBSD: pipe.S,v 1.5 2011/01/25 02:38:15 matt Exp $")
|
||||
#endif
|
||||
|
||||
#ifdef WEAK_ALIAS
|
||||
WEAK_ALIAS(pipe, _pipe)
|
||||
#endif
|
||||
@@ -44,3 +44,4 @@ _SYSCALL(_pipe,pipe)
|
||||
movl %r1,(%r2)
|
||||
clrl %r0
|
||||
ret
|
||||
END(_pipe)
|
||||
|
||||
@@ -27,13 +27,13 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "SYS.h"
|
||||
|
||||
#if defined(SYSLIBC_SCCS) && !defined(lint)
|
||||
/* .asciz "@(#)ptrace.s 8.1 (Berkeley) 6/4/93" */
|
||||
.asciz "$NetBSD: ptrace.S,v 1.7 2003/08/07 16:42:33 agc Exp $"
|
||||
RCSID("$NetBSD: ptrace.S,v 1.8 2011/01/25 02:38:15 matt Exp $")
|
||||
#endif /* SYSLIBC_SCCS and not lint */
|
||||
|
||||
#include "SYS.h"
|
||||
|
||||
ENTRY(ptrace, 0)
|
||||
#ifdef _REENTRANT
|
||||
calls $0,_C_LABEL(__errno)
|
||||
@@ -46,3 +46,4 @@ ENTRY(ptrace, 0)
|
||||
ret
|
||||
err:
|
||||
jmp CERROR+2
|
||||
END(ptrace)
|
||||
|
||||
@@ -27,13 +27,13 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "SYS.h"
|
||||
|
||||
#if defined(SYSLIBC_SCCS) && !defined(lint)
|
||||
/* .asciz "@(#)sbrk.s 8.1 (Berkeley) 6/4/93" */
|
||||
.asciz "$NetBSD: sbrk.S,v 1.10 2003/08/07 16:42:33 agc Exp $"
|
||||
RCSID("$NetBSD: sbrk.S,v 1.11 2011/01/25 02:38:15 matt Exp $")
|
||||
#endif /* SYSLIBC_SCCS and not lint */
|
||||
|
||||
#include "SYS.h"
|
||||
|
||||
.globl _end
|
||||
.globl _C_LABEL(__minbrk)
|
||||
.globl CURBRK
|
||||
@@ -61,3 +61,4 @@ ENTRY(_sbrk, 0)
|
||||
ret
|
||||
err:
|
||||
jmp CERROR+2
|
||||
END(_sbrk)
|
||||
|
||||
@@ -32,13 +32,13 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "SYS.h"
|
||||
|
||||
#if defined(SYSLIBC_SCCS) && !defined(lint)
|
||||
/* .asciz "@(#)syscall.s 8.2 (Berkeley) 1/21/94" */
|
||||
.asciz "$NetBSD: syscall.S,v 1.6 2003/08/07 16:42:34 agc Exp $"
|
||||
RCSID("$NetBSD: syscall.S,v 1.7 2011/01/25 02:38:15 matt Exp $")
|
||||
#endif /* SYSLIBC_SCCS and not lint */
|
||||
|
||||
#include "SYS.h"
|
||||
|
||||
ENTRY(syscall, 0)
|
||||
movl 4(%ap),%r0 # syscall number
|
||||
subl3 $1,(%ap)+,(%ap) # one fewer arguments
|
||||
@@ -47,3 +47,4 @@ ENTRY(syscall, 0)
|
||||
ret
|
||||
1:
|
||||
jmp CERROR+2
|
||||
END(syscall)
|
||||
|
||||
Reference in New Issue
Block a user