copy down changes from libc

This commit is contained in:
cgd 1996-10-17 04:26:20 +00:00
parent ee84c148d6
commit e6d0f7439f
7 changed files with 14 additions and 100 deletions

View File

@ -1,30 +0,0 @@
/* $NetBSD: DEFS.h,v 1.1 1995/02/13 21:49:11 cgd Exp $ */
/*
* Copyright (c) 1994, 1995 Carnegie-Mellon University.
* All rights reserved.
*
* Author: Chris G. Demetriou
*
* Permission to use, copy, modify and distribute this software and
* its documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
*
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
* FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
*
* Carnegie Mellon requests users of this software to return to
*
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
*
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*/
#include <machine/asm.h>

View File

@ -1,56 +0,0 @@
/* $NetBSD: SYS.h,v 1.2 1996/09/26 23:04:30 cgd Exp $ */
/*
* Copyright (c) 1994, 1995 Carnegie-Mellon University.
* All rights reserved.
*
* Author: Chris G. Demetriou
*
* Permission to use, copy, modify and distribute this software and
* its documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
*
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
* FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
*
* Carnegie Mellon requests users of this software to return to
*
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
*
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*/
#include <machine/asm.h>
#include <sys/syscall.h>
#define CALLSYS(num) \
CONST(num, v0); \
call_pal 0x83; /* op_callsys */
#define SYSCALL_NOLABEL(x) \
.set noat; \
CALLSYS(SYS_/**/x); \
br gp, L8000; \
L8000: \
SETGP(gp); \
beq a3, L8001; \
lda at_reg, cerror; \
jmp zero, (at_reg); \
L8001: \
.set at
#define SYSCALL(x) LEAF(x, 0 /* XXX */); SYSCALL_NOLABEL(x);
#define RSYSCALL(x) SYSCALL(x); RET; END(x);
#define PSEUDO(x,y) \
LEAF(x,0); /* unknown # of args */ \
CALLSYS(SYS_/**/y); \
RET; \
END(x);

View File

@ -1,4 +1,4 @@
/* $NetBSD: byte_swap_2.S,v 1.1 1996/04/17 22:46:37 cgd Exp $ */ /* $NetBSD: byte_swap_2.S,v 1.2 1996/10/17 04:26:21 cgd Exp $ */
/* /*
* Copyright (c) 1996 Carnegie-Mellon University. * Copyright (c) 1996 Carnegie-Mellon University.
@ -27,7 +27,7 @@
* rights to redistribute these changes. * rights to redistribute these changes.
*/ */
#include "DEFS.h" #include <machine/asm.h>
#ifndef NAME #ifndef NAME
#define NAME byte_swap_2 #define NAME byte_swap_2

View File

@ -1,4 +1,4 @@
/* $NetBSD: byte_swap_4.S,v 1.1 1996/04/17 22:46:39 cgd Exp $ */ /* $NetBSD: byte_swap_4.S,v 1.2 1996/10/17 04:26:22 cgd Exp $ */
/* /*
* Copyright (c) 1996 Carnegie-Mellon University. * Copyright (c) 1996 Carnegie-Mellon University.
@ -27,7 +27,7 @@
* rights to redistribute these changes. * rights to redistribute these changes.
*/ */
#include "DEFS.h" #include <machine/asm.h>
#ifndef NAME #ifndef NAME
#define NAME byte_swap_4 #define NAME byte_swap_4

View File

@ -1,4 +1,4 @@
/* $NetBSD: bzero.S,v 1.1 1995/10/20 01:16:02 cgd Exp $ */ /* $NetBSD: bzero.S,v 1.2 1996/10/17 04:26:24 cgd Exp $ */
/* /*
* Copyright (c) 1995 Carnegie-Mellon University. * Copyright (c) 1995 Carnegie-Mellon University.
@ -27,7 +27,7 @@
* rights to redistribute these changes. * rights to redistribute these changes.
*/ */
#include "DEFS.h" #include <machine/asm.h>
LEAF(bzero,2) LEAF(bzero,2)
ble a1,bzero_done ble a1,bzero_done

View File

@ -1,4 +1,4 @@
/* $NetBSD: divrem.m4,v 1.4 1996/09/26 23:04:31 cgd Exp $ */ /* $NetBSD: divrem.m4,v 1.5 1996/10/17 04:26:25 cgd Exp $ */
/* /*
* Copyright (c) 1994, 1995 Carnegie-Mellon University. * Copyright (c) 1994, 1995 Carnegie-Mellon University.
@ -54,7 +54,7 @@ define(CC, `t2')
define(T_0, `t3') define(T_0, `t3')
ifelse(S, `true', `define(NEG, `t4')') ifelse(S, `true', `define(NEG, `t4')')
#include "DEFS.h" #include <machine/asm.h>
LEAF(NAME, 0) /* XXX */ LEAF(NAME, 0) /* XXX */
lda sp, -64(sp) lda sp, -64(sp)
@ -125,7 +125,7 @@ ifelse(WORDSIZE, `32', `
* Find out how many bits of zeros are at the beginning of the divisor. * Find out how many bits of zeros are at the beginning of the divisor.
*/ */
LBbits: LBbits:
CONST(1, T_0) /* I = 0; BIT = 1<<WORDSIZE-1 */ ldiq T_0, 1 /* I = 0; BIT = 1<<WORDSIZE-1 */
mov zero, I mov zero, I
sll T_0, WORDSIZE-1, BIT sll T_0, WORDSIZE-1, BIT
LBloop: LBloop:
@ -138,7 +138,7 @@ LBloop:
LAbits: LAbits:
beq I, Ldodiv /* If I = 0, divide now. */ beq I, Ldodiv /* If I = 0, divide now. */
CONST(1, T_0) /* BIT = 1<<WORDSIZE-1 */ ldiq T_0, 1 /* BIT = 1<<WORDSIZE-1 */
sll T_0, WORDSIZE-1, BIT sll T_0, WORDSIZE-1, BIT
LAloop: LAloop:
@ -150,7 +150,7 @@ LAloop:
Ldodiv: Ldodiv:
sll B, I, B /* B <<= i */ sll B, I, B /* B <<= i */
CONST(1, T_0) ldiq T_0, 1
sll T_0, I, BIT sll T_0, I, BIT
Ldivloop: Ldivloop:
@ -187,7 +187,7 @@ ifelse(S, `true',
ret zero, (t9), 1 ret zero, (t9), 1
Ldotrap: Ldotrap:
CONST(-2, a0) /* This is the signal to SIGFPE! */ ldiq a0, -2 /* This is the signal to SIGFPE! */
call_pal PAL_gentrap call_pal PAL_gentrap
ifelse(OP, `div', ifelse(OP, `div',
`', ` mov zero, A /* so that zero will be returned */ `', ` mov zero, A /* so that zero will be returned */

View File

@ -1,4 +1,4 @@
/* $NetBSD: ffs.S,v 1.2 1996/07/15 05:20:19 cgd Exp $ */ /* $NetBSD: ffs.S,v 1.3 1996/10/17 04:26:26 cgd Exp $ */
/* /*
* Copyright (c) 1995 Christopher G. Demetriou * Copyright (c) 1995 Christopher G. Demetriou
@ -31,7 +31,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#include "DEFS.h" #include <machine/asm.h>
LEAF(ffs, 1) LEAF(ffs, 1)
addl a0, 0, t0 addl a0, 0, t0