Add register prefixes.
This commit is contained in:
parent
092a6ee985
commit
3b435a7396
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: SYS.h,v 1.11 1999/05/02 23:19:49 kleink Exp $ */
|
||||
/* $NetBSD: SYS.h,v 1.12 1999/10/25 23:48:07 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -44,9 +44,9 @@
|
|||
|
||||
#ifdef __STDC__
|
||||
#define IMMEDIATE #
|
||||
#define SYSTRAP(x) movl IMMEDIATE SYS_ ## x ## ,d0; trap IMMEDIATE 0
|
||||
#define SYSTRAP(x) movl IMMEDIATE SYS_ ## x ## ,%d0; trap IMMEDIATE 0
|
||||
#else
|
||||
#define SYSTRAP(x) movl #SYS_/**/x,d0; trap #0
|
||||
#define SYSTRAP(x) movl #SYS_/**/x,%d0; trap #0
|
||||
#endif
|
||||
|
||||
#ifdef __ELF__
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: __setjmp14.S,v 1.2 1999/10/18 03:22:14 itohy Exp $ */
|
||||
/* $NetBSD: __setjmp14.S,v 1.3 1999/10/25 23:48:08 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -43,7 +43,7 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)setjmp.s 5.1 (Berkeley) 5/12/90")
|
||||
#else
|
||||
RCSID("$NetBSD: __setjmp14.S,v 1.2 1999/10/18 03:22:14 itohy Exp $")
|
||||
RCSID("$NetBSD: __setjmp14.S,v 1.3 1999/10/25 23:48:08 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
|
@ -60,50 +60,50 @@
|
|||
|
||||
ENTRY(__setjmp14)
|
||||
/* Get signal stack info. Note overlay of ss_sp and ss_size! */
|
||||
lea sp@(-12),sp /* sizeof(stack_t) */
|
||||
clrl sp@ /* ss = NULL */
|
||||
movl sp,sp@(4) /* oss = stack_t on stack */
|
||||
lea %sp@(-12),%sp /* sizeof(stack_t) */
|
||||
clrl %sp@ /* ss = NULL */
|
||||
movl %sp,%sp@(4) /* oss = stack_t on stack */
|
||||
jbsr PIC_PLT(_C_LABEL(__sigaltstack14))
|
||||
|
||||
movl sp@(8),d0 /* ss_flags */
|
||||
andl #1,d0 /* extract SS_ONSTACK */
|
||||
lea sp@(12),sp /* pop stack_t */
|
||||
movl %sp@(8),%d0 /* ss_flags */
|
||||
andl #1,%d0 /* extract SS_ONSTACK */
|
||||
lea %sp@(12),%sp /* pop stack_t */
|
||||
|
||||
/* Get pointer to jmp_buf; a sigcontext is at the beginning. */
|
||||
movl sp@(4),a0
|
||||
movl d0,a0@ /* store onstack */
|
||||
clrl a0@(4) /* unused word (old style signal mask) */
|
||||
movl %sp@(4),%a0
|
||||
movl %d0,%a0@ /* store onstack */
|
||||
clrl %a0@(4) /* unused word (old style signal mask) */
|
||||
|
||||
/* Get the signal mask. */
|
||||
pea a0@(28) /* oset = &sc.sc_mask */
|
||||
movl #0,sp@- /* set = NULL */
|
||||
movl #0,sp@- /* action = 0 <ignored> */
|
||||
pea %a0@(28) /* oset = &sc.sc_mask */
|
||||
movl #0,%sp@- /* set = NULL */
|
||||
movl #0,%sp@- /* action = 0 <ignored> */
|
||||
jbsr PIC_PLT(_C_LABEL(__sigprocmask14))
|
||||
addl #12,sp
|
||||
addl #12,%sp
|
||||
|
||||
lea sp@(4),a1 /* adjust SP since we won't rts */
|
||||
movl a1,a0@(8) /* save SP */
|
||||
movl a6,a0@(12) /* save FP */
|
||||
clrl a0@(16) /* no AP */
|
||||
movl sp@,a0@(20) /* save return PC */
|
||||
clrl a0@(24) /* clear PS */
|
||||
lea %sp@(4),%a1 /* adjust SP since we won't rts */
|
||||
movl %a1,%a0@(8) /* save SP */
|
||||
movl %a6,%a0@(12) /* save FP */
|
||||
clrl %a0@(16) /* no AP */
|
||||
movl %sp@,%a0@(20) /* save return PC */
|
||||
clrl %a0@(24) /* clear PS */
|
||||
|
||||
/* Save remaining non-scratch regs after signal mask. */
|
||||
moveml #0x3CFC,a0@(44)
|
||||
moveml #0x3CFC,%a0@(44)
|
||||
|
||||
clrl d0 /* return 0 */
|
||||
clrl %d0 /* return 0 */
|
||||
rts
|
||||
|
||||
ENTRY(__longjmp14)
|
||||
movl sp@(4),a0 /* save area pointer */
|
||||
tstl a0@(8) /* ensure non-zero SP */
|
||||
movl %sp@(4),%a0 /* save area pointer */
|
||||
tstl %a0@(8) /* ensure non-zero SP */
|
||||
jeq botch /* oops! */
|
||||
movl sp@(8),d0 /* grab return value */
|
||||
movl %sp@(8),%d0 /* grab return value */
|
||||
jne ok /* non-zero ok */
|
||||
moveq #1,d0 /* else make non-zero */
|
||||
moveq #1,%d0 /* else make non-zero */
|
||||
ok:
|
||||
moveml a0@(44),#0x3CFC /* restore non-scratch regs */
|
||||
movl a0,sp@- /* let sigreturn */
|
||||
moveml %a0@(44),#0x3CFC /* restore non-scratch regs */
|
||||
movl %a0,%sp@- /* let sigreturn */
|
||||
jbsr PIC_PLT(_C_LABEL(__sigreturn14)) /* finish for us */
|
||||
|
||||
botch:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: __sigsetjmp14.S,v 1.2 1999/10/18 03:24:28 itohy Exp $ */
|
||||
/* $NetBSD: __sigsetjmp14.S,v 1.3 1999/10/25 23:48:08 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -43,7 +43,7 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)_setjmp.s 5.1 (Berkeley) 5/12/90")
|
||||
#else
|
||||
RCSID("$NetBSD: __sigsetjmp14.S,v 1.2 1999/10/18 03:24:28 itohy Exp $")
|
||||
RCSID("$NetBSD: __sigsetjmp14.S,v 1.3 1999/10/25 23:48:08 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
|
@ -62,10 +62,10 @@
|
|||
#include <m68k/setjmp.h>
|
||||
|
||||
ENTRY(__sigsetjmp14)
|
||||
movl sp@(8),d1 /* grab the mask */
|
||||
movl sp@(4),a0 /* grab the area pointer */
|
||||
movl d1,a0@(_JBLEN * 4) /* save at end of area */
|
||||
tstl d1
|
||||
movl %sp@(8),%d1 /* grab the mask */
|
||||
movl %sp@(4),%a0 /* grab the area pointer */
|
||||
movl %d1,%a0@(_JBLEN * 4) /* save at end of area */
|
||||
tstl %d1
|
||||
bne dosig
|
||||
jra PIC_PLT(_C_LABEL(_setjmp))
|
||||
dosig:
|
||||
|
@ -73,8 +73,8 @@ dosig:
|
|||
|
||||
|
||||
ENTRY(__siglongjmp14)
|
||||
movl sp@(4),a0 /* save area pointer */
|
||||
tstl a0@(_JBLEN * 4) /* check mask... */
|
||||
movl %sp@(4),%a0 /* save area pointer */
|
||||
tstl %a0@(_JBLEN * 4) /* check mask... */
|
||||
bne didsig
|
||||
jra PIC_PLT(_C_LABEL(_longjmp))
|
||||
didsig:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: _setjmp.S,v 1.5 1999/10/18 03:24:29 itohy Exp $ */
|
||||
/* $NetBSD: _setjmp.S,v 1.6 1999/10/25 23:48:09 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -43,7 +43,7 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)_setjmp.s 5.1 (Berkeley) 5/12/90")
|
||||
#else
|
||||
RCSID("$NetBSD: _setjmp.S,v 1.5 1999/10/18 03:24:29 itohy Exp $")
|
||||
RCSID("$NetBSD: _setjmp.S,v 1.6 1999/10/25 23:48:09 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
|
@ -59,32 +59,32 @@
|
|||
*/
|
||||
|
||||
ENTRY(_setjmp)
|
||||
movl sp@(4),a0 /* save area pointer */
|
||||
clrl a0@+ /* no old onstack */
|
||||
clrl a0@+ /* no old sigmask */
|
||||
movl sp,a0@+ /* save old SP */
|
||||
movl a6,a0@+ /* save old FP */
|
||||
clrl a0@+ /* no old AP */
|
||||
movl sp@,a0@+ /* save old PC */
|
||||
clrl a0@+ /* clear PS */
|
||||
moveml #0x3CFC,a0@ /* save other non-scratch regs */
|
||||
clrl d0 /* return zero */
|
||||
movl %sp@(4),%a0 /* save area pointer */
|
||||
clrl %a0@+ /* no old onstack */
|
||||
clrl %a0@+ /* no old sigmask */
|
||||
movl %sp,%a0@+ /* save old SP */
|
||||
movl %a6,%a0@+ /* save old FP */
|
||||
clrl %a0@+ /* no old AP */
|
||||
movl %sp@,%a0@+ /* save old PC */
|
||||
clrl %a0@+ /* clear PS */
|
||||
moveml #0x3CFC,%a0@ /* save other non-scratch regs */
|
||||
clrl %d0 /* return zero */
|
||||
rts
|
||||
|
||||
ENTRY(_longjmp)
|
||||
movl sp@(4),a0 /* save area pointer */
|
||||
addql #8,a0 /* skip onstack/sigmask */
|
||||
tstl a0@ /* ensure non-zero SP */
|
||||
movl %sp@(4),%a0 /* save area pointer */
|
||||
addql #8,%a0 /* skip onstack/sigmask */
|
||||
tstl %a0@ /* ensure non-zero SP */
|
||||
jeq botch /* oops! */
|
||||
movl sp@(8),d0 /* grab return value */
|
||||
movl %sp@(8),%d0 /* grab return value */
|
||||
jne ok /* non-zero ok */
|
||||
moveq #1,d0 /* else make non-zero */
|
||||
moveq #1,%d0 /* else make non-zero */
|
||||
ok:
|
||||
movl a0@+,sp /* restore SP */
|
||||
movl a0@+,a6 /* restore FP */
|
||||
addql #4,a0 /* skip AP */
|
||||
movl a0@+,sp@ /* restore PC */
|
||||
moveml a0@(4),#0x3CFC /* restore non-scratch regs */
|
||||
movl %a0@+,%sp /* restore SP */
|
||||
movl %a0@+,%a6 /* restore FP */
|
||||
addql #4,%a0 /* skip AP */
|
||||
movl %a0@+,%sp@ /* restore PC */
|
||||
moveml %a0@(4),#0x3CFC /* restore non-scratch regs */
|
||||
rts
|
||||
|
||||
botch:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: adddf3.S,v 1.4 1999/05/02 20:17:20 kleink Exp $ */
|
||||
/* $NetBSD: adddf3.S,v 1.5 1999/10/25 23:48:09 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -43,17 +43,17 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)adddf3.s 5.1 (Berkeley) 6/7/90")
|
||||
#else
|
||||
RCSID("$NetBSD: adddf3.S,v 1.4 1999/05/02 20:17:20 kleink Exp $")
|
||||
RCSID("$NetBSD: adddf3.S,v 1.5 1999/10/25 23:48:09 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
/* double + double */
|
||||
ENTRY(__adddf3)
|
||||
fmoved sp@(4),fp0
|
||||
faddd sp@(12),fp0
|
||||
fmoved %sp@(4),%fp0
|
||||
faddd %sp@(12),%fp0
|
||||
#ifndef __SVR4_ABI__
|
||||
fmoved fp0,sp@-
|
||||
movel sp@+,d0
|
||||
movel sp@+,d1
|
||||
fmoved %fp0,%sp@-
|
||||
movel %sp@+,%d0
|
||||
movel %sp@+,%d1
|
||||
#endif
|
||||
rts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: addsf3.S,v 1.4 1999/05/02 20:17:20 kleink Exp $ */
|
||||
/* $NetBSD: addsf3.S,v 1.5 1999/10/25 23:48:09 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -43,15 +43,15 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)addsf3.s 5.1 (Berkeley) 6/7/90")
|
||||
#else
|
||||
RCSID("$NetBSD: addsf3.S,v 1.4 1999/05/02 20:17:20 kleink Exp $")
|
||||
RCSID("$NetBSD: addsf3.S,v 1.5 1999/10/25 23:48:09 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
/* single + single */
|
||||
ENTRY(__addsf3)
|
||||
fmoves sp@(4),fp0
|
||||
fadds sp@(8),fp0
|
||||
fmoves %sp@(4),%fp0
|
||||
fadds %sp@(8),%fp0
|
||||
#ifndef __SVR4_ABI__
|
||||
fmoves fp0,d0
|
||||
fmoves %fp0,%d0
|
||||
#endif
|
||||
rts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: alloca.S,v 1.4 1999/05/02 20:09:29 kleink Exp $ */
|
||||
/* $NetBSD: alloca.S,v 1.5 1999/10/25 23:48:09 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -43,21 +43,21 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)alloca.s 5.1 (Berkeley) 5/12/90")
|
||||
#else
|
||||
RCSID("$NetBSD: alloca.S,v 1.4 1999/05/02 20:09:29 kleink Exp $")
|
||||
RCSID("$NetBSD: alloca.S,v 1.5 1999/10/25 23:48:09 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
/* like alloc, but automatic free in return */
|
||||
|
||||
ENTRY(alloca)
|
||||
movl sp@,a1 /* save return addr */
|
||||
movl sp,d0 /* get current SP value */
|
||||
subl sp@(4),d0 /* allocate requested space */
|
||||
andb #~3,d0 /* longword align for efficiency */
|
||||
addql #8,d0 /* reuse space of call frame */
|
||||
movl d0,sp /* set new SP value */
|
||||
lea sp@(-4),sp /* account for argument pop in caller */
|
||||
movl %sp@,%a1 /* save return addr */
|
||||
movl %sp,%d0 /* get current SP value */
|
||||
subl %sp@(4),%d0 /* allocate requested space */
|
||||
andb #~3,%d0 /* longword align for efficiency */
|
||||
addql #8,%d0 /* reuse space of call frame */
|
||||
movl %d0,%sp /* set new SP value */
|
||||
lea %sp@(-4),%sp /* account for argument pop in caller */
|
||||
#ifdef __SVR4_ABI__
|
||||
moveal d0,a0
|
||||
moveal %d0,%a0
|
||||
#endif
|
||||
jmp a1@ /* funny return */
|
||||
jmp %a1@ /* funny return */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ashlsi3.S,v 1.3 1997/04/25 00:58:45 thorpej Exp $ */
|
||||
/* $NetBSD: ashlsi3.S,v 1.4 1999/10/25 23:48:09 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -43,13 +43,13 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)ashlsi3.s 5.1 (Berkeley) 6/7/90")
|
||||
#else
|
||||
RCSID("$NetBSD: ashlsi3.S,v 1.3 1997/04/25 00:58:45 thorpej Exp $")
|
||||
RCSID("$NetBSD: ashlsi3.S,v 1.4 1999/10/25 23:48:09 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
/* int << int */
|
||||
ENTRY(__ashlsi3)
|
||||
movel sp@(8),d1
|
||||
movel sp@(4),d0
|
||||
asll d1,d0
|
||||
movel %sp@(8),%d1
|
||||
movel %sp@(4),%d0
|
||||
asll %d1,%d0
|
||||
rts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ashrsi3.S,v 1.3 1997/04/25 00:58:45 thorpej Exp $ */
|
||||
/* $NetBSD: ashrsi3.S,v 1.4 1999/10/25 23:48:09 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -43,13 +43,13 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)ashrsi3.s 5.1 (Berkeley) 6/7/90")
|
||||
#else
|
||||
RCSID("$NetBSD: ashrsi3.S,v 1.3 1997/04/25 00:58:45 thorpej Exp $")
|
||||
RCSID("$NetBSD: ashrsi3.S,v 1.4 1999/10/25 23:48:09 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
/* int >> int */
|
||||
ENTRY(__ashrsi3)
|
||||
movel sp@(8),d1
|
||||
movel sp@(4),d0
|
||||
asrl d1,d0
|
||||
movel %sp@(8),%d1
|
||||
movel %sp@(4),%d0
|
||||
asrl %d1,%d0
|
||||
rts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: bswap16.S,v 1.1 1999/01/15 13:31:18 bouyer Exp $ */
|
||||
/* $NetBSD: bswap16.S,v 1.2 1999/10/25 23:48:09 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1996 Scott Reynolds. All rights reserved.
|
||||
|
@ -29,6 +29,6 @@
|
|||
#include <machine/asm.h>
|
||||
|
||||
ENTRY(bswap16)
|
||||
movl sp@(4),d0
|
||||
rolw #8,d0
|
||||
movl %sp@(4),%d0
|
||||
rolw #8,%d0
|
||||
rts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: bswap32.S,v 1.1 1999/01/15 13:31:18 bouyer Exp $ */
|
||||
/* $NetBSD: bswap32.S,v 1.2 1999/10/25 23:48:09 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1996 Scott Reynolds. All rights reserved.
|
||||
|
@ -29,8 +29,8 @@
|
|||
#include <machine/asm.h>
|
||||
|
||||
ENTRY(bswap32)
|
||||
movl sp@(4),d0
|
||||
rolw #8,d0
|
||||
swap d0
|
||||
rolw #8,d0
|
||||
movl %sp@(4),%d0
|
||||
rolw #8,%d0
|
||||
swap %d0
|
||||
rolw #8,%d0
|
||||
rts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: bswap64.S,v 1.2 1999/02/08 22:00:13 is Exp $ */
|
||||
/* $NetBSD: bswap64.S,v 1.3 1999/10/25 23:48:09 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1996 Scott Reynolds. All rights reserved.
|
||||
|
@ -29,12 +29,12 @@
|
|||
#include <machine/asm.h>
|
||||
|
||||
ENTRY(bswap64)
|
||||
movl sp@(4),d1
|
||||
movl sp@(8),d0
|
||||
rolw #8,d1
|
||||
rolw #8,d0
|
||||
swap d1
|
||||
swap d0
|
||||
rolw #8,d0
|
||||
rolw #8,d1
|
||||
movl %sp@(4),%d1
|
||||
movl %sp@(8),%d0
|
||||
rolw #8,%d1
|
||||
rolw #8,%d0
|
||||
swap %d1
|
||||
swap %d0
|
||||
rolw #8,%d0
|
||||
rolw #8,%d1
|
||||
rts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: cmpdf2.S,v 1.3 1997/04/25 00:58:46 thorpej Exp $ */
|
||||
/* $NetBSD: cmpdf2.S,v 1.4 1999/10/25 23:48:09 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -43,7 +43,7 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)cmpdf2.s 5.1 (Berkeley) 6/7/90")
|
||||
#else
|
||||
RCSID("$NetBSD: cmpdf2.S,v 1.3 1997/04/25 00:58:46 thorpej Exp $")
|
||||
RCSID("$NetBSD: cmpdf2.S,v 1.4 1999/10/25 23:48:09 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
|
@ -51,12 +51,12 @@
|
|||
/* double < double: -1 */
|
||||
/* double == double: 0 */
|
||||
ENTRY(__cmpdf2)
|
||||
fmoved sp@(4),fp0
|
||||
fcmpd sp@(12),fp0
|
||||
fmoved %sp@(4),%fp0
|
||||
fcmpd %sp@(12),%fp0
|
||||
fbgt Lagtb
|
||||
fslt d0
|
||||
extbl d0
|
||||
fslt %d0
|
||||
extbl %d0
|
||||
rts
|
||||
Lagtb:
|
||||
moveq #1,d0
|
||||
moveq #1,%d0
|
||||
rts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: cmpsf2.S,v 1.3 1997/04/25 00:58:47 thorpej Exp $ */
|
||||
/* $NetBSD: cmpsf2.S,v 1.4 1999/10/25 23:48:09 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -43,7 +43,7 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)cmpsf2.s 5.1 (Berkeley) 6/7/90")
|
||||
#else
|
||||
RCSID("$NetBSD: cmpsf2.S,v 1.3 1997/04/25 00:58:47 thorpej Exp $")
|
||||
RCSID("$NetBSD: cmpsf2.S,v 1.4 1999/10/25 23:48:09 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
|
@ -51,12 +51,12 @@
|
|||
/* single < single: -1 */
|
||||
/* single == single: 0 */
|
||||
ENTRY(__cmpsf2)
|
||||
fmoves sp@(4),fp0
|
||||
fcmps sp@(8),fp0
|
||||
fmoves %sp@(4),%fp0
|
||||
fcmps %sp@(8),%fp0
|
||||
fbgt Lagtb
|
||||
fslt d0
|
||||
extbl d0
|
||||
fslt %d0
|
||||
extbl %d0
|
||||
rts
|
||||
Lagtb:
|
||||
moveq #1,d0
|
||||
moveq #1,%d0
|
||||
rts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: divdf3.S,v 1.4 1999/05/02 20:17:20 kleink Exp $ */
|
||||
/* $NetBSD: divdf3.S,v 1.5 1999/10/25 23:48:10 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -43,17 +43,17 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)divdf3.s 5.1 (Berkeley) 6/7/90")
|
||||
#else
|
||||
RCSID("$NetBSD: divdf3.S,v 1.4 1999/05/02 20:17:20 kleink Exp $")
|
||||
RCSID("$NetBSD: divdf3.S,v 1.5 1999/10/25 23:48:10 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
/* double / double */
|
||||
ENTRY(__divdf3)
|
||||
fmoved sp@(4),fp0
|
||||
fdivd sp@(12),fp0
|
||||
fmoved %sp@(4),%fp0
|
||||
fdivd %sp@(12),%fp0
|
||||
#ifndef __SVR4_ABI__
|
||||
fmoved fp0,sp@-
|
||||
movel sp@+,d0
|
||||
movel sp@+,d1
|
||||
fmoved %fp0,%sp@-
|
||||
movel %sp@+,%d0
|
||||
movel %sp@+,%d1
|
||||
#endif
|
||||
rts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: divsf3.S,v 1.4 1999/05/02 20:17:21 kleink Exp $ */
|
||||
/* $NetBSD: divsf3.S,v 1.5 1999/10/25 23:48:10 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -43,15 +43,15 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)divsf3.s 5.1 (Berkeley) 6/7/90")
|
||||
#else
|
||||
RCSID("$NetBSD: divsf3.S,v 1.4 1999/05/02 20:17:21 kleink Exp $")
|
||||
RCSID("$NetBSD: divsf3.S,v 1.5 1999/10/25 23:48:10 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
/* single / single */
|
||||
ENTRY(__divsf3)
|
||||
fmoves sp@(4),fp0
|
||||
fdivs sp@(8),fp0
|
||||
fmoves %sp@(4),%fp0
|
||||
fdivs %sp@(8),%fp0
|
||||
#ifndef __SVR4_ABI__
|
||||
fmoves fp0,d0
|
||||
fmoves %fp0,%d0
|
||||
#endif
|
||||
rts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: divsi3.S,v 1.3 1997/04/25 00:58:49 thorpej Exp $ */
|
||||
/* $NetBSD: divsi3.S,v 1.4 1999/10/25 23:48:10 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -43,12 +43,12 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)divsi3.s 5.1 (Berkeley) 6/7/90")
|
||||
#else
|
||||
RCSID("$NetBSD: divsi3.S,v 1.3 1997/04/25 00:58:49 thorpej Exp $")
|
||||
RCSID("$NetBSD: divsi3.S,v 1.4 1999/10/25 23:48:10 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
/* int / int */
|
||||
ENTRY(__divsi3)
|
||||
movel sp@(4),d0
|
||||
divsl sp@(8),d0
|
||||
movel %sp@(4),%d0
|
||||
divsl %sp@(8),%d0
|
||||
rts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: extendsfdf2.S,v 1.4 1999/05/02 20:17:21 kleink Exp $ */
|
||||
/* $NetBSD: extendsfdf2.S,v 1.5 1999/10/25 23:48:10 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -43,16 +43,16 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)extendsfdf2.s 5.1 (Berkeley) 6/7/90")
|
||||
#else
|
||||
RCSID("$NetBSD: extendsfdf2.S,v 1.4 1999/05/02 20:17:21 kleink Exp $")
|
||||
RCSID("$NetBSD: extendsfdf2.S,v 1.5 1999/10/25 23:48:10 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
/* (double) float */
|
||||
ENTRY(__extendsfdf2)
|
||||
fmoves sp@(4),fp0
|
||||
fmoves %sp@(4),%fp0
|
||||
#ifndef __SVR4_ABI__
|
||||
fmoved fp0,sp@-
|
||||
movel sp@+,d0
|
||||
movel sp@+,d1
|
||||
fmoved %fp0,%sp@-
|
||||
movel %sp@+,%d0
|
||||
movel %sp@+,%d1
|
||||
#endif
|
||||
rts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: fabs.S,v 1.5 1999/05/02 20:17:21 kleink Exp $ */
|
||||
/* $NetBSD: fabs.S,v 1.6 1999/10/25 23:48:10 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||
|
@ -38,15 +38,15 @@
|
|||
|
||||
#include <machine/asm.h>
|
||||
|
||||
RCSID("$NetBSD: fabs.S,v 1.5 1999/05/02 20:17:21 kleink Exp $")
|
||||
RCSID("$NetBSD: fabs.S,v 1.6 1999/10/25 23:48:10 thorpej Exp $")
|
||||
|
||||
ENTRY(fabs)
|
||||
#ifdef __SVR4_ABI__
|
||||
bclr #31,sp@(4)
|
||||
fmoved sp@(4),fp0
|
||||
bclr #31,%sp@(4)
|
||||
fmoved %sp@(4),%fp0
|
||||
#else
|
||||
movl sp@(4),d0
|
||||
movl sp@(8),d1
|
||||
bclr #31,d0
|
||||
movl %sp@(4),%d0
|
||||
movl %sp@(8),%d1
|
||||
bclr #31,%d0
|
||||
#endif
|
||||
rts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: fixdfsi.S,v 1.3 1997/04/25 00:58:51 thorpej Exp $ */
|
||||
/* $NetBSD: fixdfsi.S,v 1.4 1999/10/25 23:48:10 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -43,12 +43,12 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)fixdfsi.s 5.1 (Berkeley) 6/7/90")
|
||||
#else
|
||||
RCSID("$NetBSD: fixdfsi.S,v 1.3 1997/04/25 00:58:51 thorpej Exp $")
|
||||
RCSID("$NetBSD: fixdfsi.S,v 1.4 1999/10/25 23:48:10 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
/* (int) double */
|
||||
ENTRY(__fixdfsi)
|
||||
fintrzd sp@(4),fp0
|
||||
fmovel fp0,d0
|
||||
fintrzd %sp@(4),%fp0
|
||||
fmovel %fp0,%d0
|
||||
rts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: fixunsdfsi.S,v 1.3 1997/04/25 00:58:51 thorpej Exp $ */
|
||||
/* $NetBSD: fixunsdfsi.S,v 1.4 1999/10/25 23:48:10 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -43,19 +43,19 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)fixunsdfsi.s 5.1 (Berkeley) 6/7/90")
|
||||
#else
|
||||
RCSID("$NetBSD: fixunsdfsi.S,v 1.3 1997/04/25 00:58:51 thorpej Exp $")
|
||||
RCSID("$NetBSD: fixunsdfsi.S,v 1.4 1999/10/25 23:48:10 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
/* (unsigned) double */
|
||||
ENTRY(__fixunsdfsi)
|
||||
fintrzd sp@(4),fp0
|
||||
fcmpd #0r2147483648.0,fp0
|
||||
fintrzd %sp@(4),%fp0
|
||||
fcmpd #0r2147483648.0,%fp0
|
||||
fbge Lwaybig
|
||||
fmovel fp0,d0
|
||||
fmovel %fp0,%d0
|
||||
rts
|
||||
Lwaybig:
|
||||
fsubd #0r2147483648.0,fp0
|
||||
fmovel fp0,d0
|
||||
bset #31,d0
|
||||
fsubd #0r2147483648.0,%fp0
|
||||
fmovel %fp0,%d0
|
||||
bset #31,%d0
|
||||
rts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: floatsidf.S,v 1.4 1999/05/02 20:17:21 kleink Exp $ */
|
||||
/* $NetBSD: floatsidf.S,v 1.5 1999/10/25 23:48:10 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -43,17 +43,17 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)floatsidf.s 5.1 (Berkeley) 6/7/90")
|
||||
#else
|
||||
RCSID("$NetBSD: floatsidf.S,v 1.4 1999/05/02 20:17:21 kleink Exp $")
|
||||
RCSID("$NetBSD: floatsidf.S,v 1.5 1999/10/25 23:48:10 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
/* (double) int */
|
||||
ENTRY(__floatsidf)
|
||||
fmovel sp@(4),fp0
|
||||
fmovel %sp@(4),%fp0
|
||||
#ifndef __SVR4_ABI__
|
||||
fmoved fp0,sp@-
|
||||
movel sp@+,d0
|
||||
movel sp@+,d1
|
||||
fmoved %fp0,%sp@-
|
||||
movel %sp@+,%d0
|
||||
movel %sp@+,%d1
|
||||
#endif
|
||||
rts
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: flt_rounds.S,v 1.7 1995/12/13 19:36:12 thorpej Exp $ */
|
||||
/* $NetBSD: flt_rounds.S,v 1.8 1999/10/25 23:48:10 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Written by J.T. Conklin, Apr 6, 1995
|
||||
|
@ -16,8 +16,8 @@ _map:
|
|||
.byte 2 /* round to positive infinity */
|
||||
|
||||
ENTRY(__flt_rounds)
|
||||
fmovel fpcr,d0
|
||||
bfextu d0{#26:#2},d0
|
||||
lea _map,a0
|
||||
moveb a0@(d0:l:1),d0
|
||||
fmovel %fpcr,%d0
|
||||
bfextu %d0{#26:#2},%d0
|
||||
lea _map,%a0
|
||||
moveb %a0@(%d0:l:1),%d0
|
||||
rts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: fpgetmask.S,v 1.5 1995/12/13 19:36:13 thorpej Exp $ */
|
||||
/* $NetBSD: fpgetmask.S,v 1.6 1999/10/25 23:48:10 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Written by Charles M. Hannum, Apr 9, 1995
|
||||
|
@ -8,6 +8,6 @@
|
|||
#include <machine/asm.h>
|
||||
|
||||
ENTRY(fpgetmask)
|
||||
fmovel fpcr,d0
|
||||
bfextu d0{#18:#5},d0
|
||||
fmovel %fpcr,%d0
|
||||
bfextu %d0{#18:#5},%d0
|
||||
rts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: fpgetround.S,v 1.6 1995/12/13 19:36:15 thorpej Exp $ */
|
||||
/* $NetBSD: fpgetround.S,v 1.7 1999/10/25 23:48:10 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Written by J.T. Conklin, Apr 6, 1995
|
||||
|
@ -8,6 +8,6 @@
|
|||
#include <machine/asm.h>
|
||||
|
||||
ENTRY(fpgetround)
|
||||
fmovel fpcr,d0
|
||||
bfextu d0{#26:#2},d0
|
||||
fmovel %fpcr,%d0
|
||||
bfextu %d0{#26:#2},%d0
|
||||
rts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: fpgetsticky.S,v 1.5 1995/12/13 19:36:16 thorpej Exp $ */
|
||||
/* $NetBSD: fpgetsticky.S,v 1.6 1999/10/25 23:48:11 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Written by Charles M. Hannum, Apr 9, 1995
|
||||
|
@ -8,6 +8,6 @@
|
|||
#include <machine/asm.h>
|
||||
|
||||
ENTRY(fpgetsticky)
|
||||
fmovel fpsr,d0
|
||||
bfextu d0{#24:#5},d0
|
||||
fmovel %fpsr,%d0
|
||||
bfextu %d0{#24:#5},%d0
|
||||
rts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: fpsetmask.S,v 1.5 1995/12/13 19:36:18 thorpej Exp $ */
|
||||
/* $NetBSD: fpsetmask.S,v 1.6 1999/10/25 23:48:11 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Written by Charles M. Hannum, Apr 9, 1995
|
||||
|
@ -8,11 +8,11 @@
|
|||
#include <machine/asm.h>
|
||||
|
||||
ENTRY(fpsetmask)
|
||||
movel d2,sp@-
|
||||
fmovel fpcr,d1
|
||||
movel sp@(8),d2
|
||||
bfextu d1{#18:#5},d0
|
||||
bfins d2,d1{#18:#5}
|
||||
movel sp@+,d2
|
||||
fmovel d1,fpcr
|
||||
movel %d2,%sp@-
|
||||
fmovel %fpcr,%d1
|
||||
movel %sp@(8),%d2
|
||||
bfextu %d1{#18:#5},%d0
|
||||
bfins %d2,%d1{#18:#5}
|
||||
movel %sp@+,%d2
|
||||
fmovel %d1,%fpcr
|
||||
rts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: fpsetround.S,v 1.6 1995/12/13 19:36:20 thorpej Exp $ */
|
||||
/* $NetBSD: fpsetround.S,v 1.7 1999/10/25 23:48:11 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Written by J.T. Conklin, Apr 6, 1995
|
||||
|
@ -8,11 +8,11 @@
|
|||
#include <machine/asm.h>
|
||||
|
||||
ENTRY(fpsetround)
|
||||
movel d2,sp@-
|
||||
fmovel fpcr,d1
|
||||
movel sp@(8),d2
|
||||
bfextu d1{#26,#2},d0
|
||||
bfins d2,d1{#26:#2}
|
||||
movel sp@+,d2
|
||||
fmovel d1,fpcr
|
||||
movel %d2,%sp@-
|
||||
fmovel %fpcr,%d1
|
||||
movel %sp@(8),%d2
|
||||
bfextu %d1{#26,#2},%d0
|
||||
bfins %d2,%d1{#26:#2}
|
||||
movel %sp@+,%d2
|
||||
fmovel %d1,%fpcr
|
||||
rts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: fpsetsticky.S,v 1.5 1995/12/13 19:36:24 thorpej Exp $ */
|
||||
/* $NetBSD: fpsetsticky.S,v 1.6 1999/10/25 23:48:11 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Written by Charles M. Hannum, Apr 9, 1995
|
||||
|
@ -8,11 +8,11 @@
|
|||
#include <machine/asm.h>
|
||||
|
||||
ENTRY(fpsetsticky)
|
||||
movel d2,sp@-
|
||||
fmovel fpsr,d1
|
||||
movel sp@(8),d2
|
||||
bfextu d1{#24:#5},d0
|
||||
bfins d2,d1{#24:#5}
|
||||
movel sp@+,d2
|
||||
fmovel d1,fpsr
|
||||
movel %d2,%sp@-
|
||||
fmovel %fpsr,%d1
|
||||
movel %sp@(8),%d2
|
||||
bfextu %d1{#24:#5},%d0
|
||||
bfins %d2,%d1{#24:#5}
|
||||
movel %sp@+,%d2
|
||||
fmovel %d1,%fpsr
|
||||
rts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: lshlsi3.S,v 1.3 1997/04/25 00:58:53 thorpej Exp $ */
|
||||
/* $NetBSD: lshlsi3.S,v 1.4 1999/10/25 23:48:11 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -43,13 +43,13 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)lshlsi3.s 5.1 (Berkeley) 6/7/90")
|
||||
#else
|
||||
RCSID("$NetBSD: lshlsi3.S,v 1.3 1997/04/25 00:58:53 thorpej Exp $")
|
||||
RCSID("$NetBSD: lshlsi3.S,v 1.4 1999/10/25 23:48:11 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
/* unsigned << unsigned */
|
||||
ENTRY(__lshlsi3)
|
||||
movel sp@(8),d1
|
||||
movel sp@(4),d0
|
||||
lsll d1,d0
|
||||
movel %sp@(8),%d1
|
||||
movel %sp@(4),%d0
|
||||
lsll %d1,%d0
|
||||
rts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: lshrsi3.S,v 1.3 1997/04/25 00:58:54 thorpej Exp $ */
|
||||
/* $NetBSD: lshrsi3.S,v 1.4 1999/10/25 23:48:11 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -43,13 +43,13 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)lshrsi3.s 5.1 (Berkeley) 6/7/90")
|
||||
#else
|
||||
RCSID("$NetBSD: lshrsi3.S,v 1.3 1997/04/25 00:58:54 thorpej Exp $")
|
||||
RCSID("$NetBSD: lshrsi3.S,v 1.4 1999/10/25 23:48:11 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
/* unsigned >> unsigned */
|
||||
ENTRY(__lshrsi3)
|
||||
movel sp@(8),d1
|
||||
movel sp@(4),d0
|
||||
lsrl d1,d0
|
||||
movel %sp@(8),%d1
|
||||
movel %sp@(4),%d0
|
||||
lsrl %d1,%d0
|
||||
rts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: modf.S,v 1.4 1999/05/02 20:17:21 kleink Exp $ */
|
||||
/* $NetBSD: modf.S,v 1.5 1999/10/25 23:48:11 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -43,7 +43,7 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)modf.s 5.1 (Berkeley) 5/12/90")
|
||||
#else
|
||||
RCSID("$NetBSD: modf.S,v 1.4 1999/05/02 20:17:21 kleink Exp $")
|
||||
RCSID("$NetBSD: modf.S,v 1.5 1999/10/25 23:48:11 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
|
@ -52,14 +52,14 @@
|
|||
* returns: xxx and n (in *iptr) where val == n.xxx
|
||||
*/
|
||||
ENTRY(modf)
|
||||
fmoved sp@(4),fp0
|
||||
movel sp@(12),a0
|
||||
fintrzx fp0,fp1
|
||||
fmoved fp1,a0@
|
||||
fsubx fp1,fp0
|
||||
fmoved %sp@(4),%fp0
|
||||
movel %sp@(12),%a0
|
||||
fintrzx %fp0,%fp1
|
||||
fmoved %fp1,%a0@
|
||||
fsubx %fp1,%fp0
|
||||
#ifndef __SVR4_ABI__
|
||||
fmoved fp0,sp@-
|
||||
movel sp@+,d0
|
||||
movel sp@+,d1
|
||||
fmoved %fp0,%sp@-
|
||||
movel %sp@+,%d0
|
||||
movel %sp@+,%d1
|
||||
#endif
|
||||
rts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: modsi3.S,v 1.3 1997/04/25 00:58:56 thorpej Exp $ */
|
||||
/* $NetBSD: modsi3.S,v 1.4 1999/10/25 23:48:11 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -43,12 +43,12 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)modsi3.s 5.1 (Berkeley) 6/7/90")
|
||||
#else
|
||||
RCSID("$NetBSD: modsi3.S,v 1.3 1997/04/25 00:58:56 thorpej Exp $")
|
||||
RCSID("$NetBSD: modsi3.S,v 1.4 1999/10/25 23:48:11 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
/* int % int */
|
||||
ENTRY(__modsi3)
|
||||
movel sp@(4),d1
|
||||
divsll sp@(8),d0:d1
|
||||
movel %sp@(4),%d1
|
||||
divsll %sp@(8),%d0:%d1
|
||||
rts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: muldf3.S,v 1.5 1999/05/02 20:18:17 kleink Exp $ */
|
||||
/* $NetBSD: muldf3.S,v 1.6 1999/10/25 23:48:11 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -43,17 +43,17 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)muldf3.s 5.1 (Berkeley) 6/7/90")
|
||||
#else
|
||||
RCSID("$NetBSD: muldf3.S,v 1.5 1999/05/02 20:18:17 kleink Exp $")
|
||||
RCSID("$NetBSD: muldf3.S,v 1.6 1999/10/25 23:48:11 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
/* double * double */
|
||||
ENTRY(__muldf3)
|
||||
fmoved sp@(4),fp0
|
||||
fmuld sp@(12),fp0
|
||||
fmoved %sp@(4),%fp0
|
||||
fmuld %sp@(12),%fp0
|
||||
#ifndef __SVR4_ABI__
|
||||
fmoved fp0,sp@-
|
||||
movel sp@+,d0
|
||||
movel sp@+,d1
|
||||
fmoved %fp0,%sp@-
|
||||
movel %sp@+,%d0
|
||||
movel %sp@+,%d1
|
||||
#endif
|
||||
rts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mulsf3.S,v 1.4 1999/05/02 20:17:21 kleink Exp $ */
|
||||
/* $NetBSD: mulsf3.S,v 1.5 1999/10/25 23:48:11 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -43,15 +43,15 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)mulsf3.s 5.1 (Berkeley) 6/7/90")
|
||||
#else
|
||||
RCSID("$NetBSD: mulsf3.S,v 1.4 1999/05/02 20:17:21 kleink Exp $")
|
||||
RCSID("$NetBSD: mulsf3.S,v 1.5 1999/10/25 23:48:11 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
/* single * single */
|
||||
ENTRY(__mulsf3)
|
||||
fmoves sp@(4),fp0
|
||||
fmuls sp@(8),fp0
|
||||
fmoves %sp@(4),%fp0
|
||||
fmuls %sp@(8),%fp0
|
||||
#ifndef __SVR4_ABI__
|
||||
fmoves fp0,d0
|
||||
fmoves %fp0,%d0
|
||||
#endif
|
||||
rts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mulsi3.S,v 1.3 1997/04/25 00:58:58 thorpej Exp $ */
|
||||
/* $NetBSD: mulsi3.S,v 1.4 1999/10/25 23:48:11 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -43,12 +43,12 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)mulsi3.s 5.1 (Berkeley) 6/7/90")
|
||||
#else
|
||||
RCSID("$NetBSD: mulsi3.S,v 1.3 1997/04/25 00:58:58 thorpej Exp $")
|
||||
RCSID("$NetBSD: mulsi3.S,v 1.4 1999/10/25 23:48:11 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
/* int * int */
|
||||
ENTRY(__mulsi3)
|
||||
movel sp@(4),d0
|
||||
mulsl sp@(8),d0
|
||||
movel %sp@(4),%d0
|
||||
mulsl %sp@(8),%d0
|
||||
rts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: negdf2.S,v 1.4 1999/05/02 20:17:21 kleink Exp $ */
|
||||
/* $NetBSD: negdf2.S,v 1.5 1999/10/25 23:48:12 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -43,17 +43,17 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)negdf2.s 5.1 (Berkeley) 6/7/90")
|
||||
#else
|
||||
RCSID("$NetBSD: negdf2.S,v 1.4 1999/05/02 20:17:21 kleink Exp $")
|
||||
RCSID("$NetBSD: negdf2.S,v 1.5 1999/10/25 23:48:12 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
/* -double */
|
||||
ENTRY(__negdf2)
|
||||
#ifdef __SVR4_ABI__
|
||||
fnegd sp@(4),fp0
|
||||
fnegd %sp@(4),%fp0
|
||||
#else
|
||||
movel sp@(4),d0
|
||||
movel sp@(8),d1
|
||||
bchg #31,d0
|
||||
movel %sp@(4),%d0
|
||||
movel %sp@(8),%d1
|
||||
bchg #31,%d0
|
||||
#endif
|
||||
rts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: negsf2.S,v 1.4 1999/05/02 20:17:21 kleink Exp $ */
|
||||
/* $NetBSD: negsf2.S,v 1.5 1999/10/25 23:48:12 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -43,16 +43,16 @@
|
|||
#if 0
|
||||
RCSID"from: @(#)negsf2.s 5.1 (Berkeley) 6/7/90")
|
||||
#else
|
||||
RCSID("$NetBSD: negsf2.S,v 1.4 1999/05/02 20:17:21 kleink Exp $")
|
||||
RCSID("$NetBSD: negsf2.S,v 1.5 1999/10/25 23:48:12 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
/* -single */
|
||||
ENTRY(__negsf2)
|
||||
#ifdef __SVR4_ABI__
|
||||
fnegs sp@(4),fp0
|
||||
fnegs %sp@(4),%fp0
|
||||
#else
|
||||
movel sp@(4),d0
|
||||
bchg #31,d0
|
||||
movel %sp@(4),%d0
|
||||
bchg #31,%d0
|
||||
#endif
|
||||
rts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: setjmp.S,v 1.9 1999/10/18 03:22:14 itohy Exp $ */
|
||||
/* $NetBSD: setjmp.S,v 1.10 1999/10/25 23:48:12 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -43,7 +43,7 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)setjmp.s 5.1 (Berkeley) 5/12/90")
|
||||
#else
|
||||
RCSID("$NetBSD: setjmp.S,v 1.9 1999/10/18 03:22:14 itohy Exp $")
|
||||
RCSID("$NetBSD: setjmp.S,v 1.10 1999/10/25 23:48:12 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
|
@ -59,39 +59,39 @@
|
|||
*/
|
||||
|
||||
ENTRY(setjmp)
|
||||
lea sp@(-12),sp /* space for sigstack args/rvals */
|
||||
clrl sp@ /* don't change it... */
|
||||
movl sp,sp@(4) /* ...but return the current val */
|
||||
lea %sp@(-12),%sp /* space for sigstack args/rvals */
|
||||
clrl %sp@ /* don't change it... */
|
||||
movl %sp,%sp@(4) /* ...but return the current val */
|
||||
jbsr PIC_PLT(_C_LABEL(__sigaltstack14))
|
||||
/* note: flags returned in sp@(8) */
|
||||
clrl sp@ /* don't change mask, just return */
|
||||
clrl %sp@ /* don't change mask, just return */
|
||||
jbsr PIC_PLT(_C_LABEL(sigblock)) /* old value */
|
||||
movl sp@(8),d1 /* old flags value */
|
||||
andl #1,d1 /* extract onstack flag */
|
||||
lea sp@(12),sp
|
||||
movl sp@(4),a0 /* save area pointer */
|
||||
movl d1,a0@+ /* save old onstack value */
|
||||
movl d0,a0@+ /* save old signal mask */
|
||||
lea sp@(4),a1 /* adjust saved SP since we won't rts */
|
||||
movl a1,a0@+ /* save old SP */
|
||||
movl a6,a0@+ /* save old FP */
|
||||
clrl a0@+ /* no AP */
|
||||
movl sp@,a0@+ /* save old PC */
|
||||
clrl a0@+ /* clean PS */
|
||||
moveml #0x3CFC,a0@ /* save remaining non-scratch regs */
|
||||
clrl d0 /* return 0 */
|
||||
movl %sp@(8),%d1 /* old flags value */
|
||||
andl #1,%d1 /* extract onstack flag */
|
||||
lea %sp@(12),%sp
|
||||
movl %sp@(4),%a0 /* save area pointer */
|
||||
movl %d1,%a0@+ /* save old onstack value */
|
||||
movl %d0,%a0@+ /* save old signal mask */
|
||||
lea %sp@(4),%a1 /* adjust saved SP since we won't rts */
|
||||
movl %a1,%a0@+ /* save old SP */
|
||||
movl %a6,%a0@+ /* save old FP */
|
||||
clrl %a0@+ /* no AP */
|
||||
movl %sp@,%a0@+ /* save old PC */
|
||||
clrl %a0@+ /* clean PS */
|
||||
moveml #0x3CFC,%a0@ /* save remaining non-scratch regs */
|
||||
clrl %d0 /* return 0 */
|
||||
rts
|
||||
|
||||
ENTRY(longjmp)
|
||||
movl sp@(4),a0 /* save area pointer */
|
||||
tstl a0@(8) /* ensure non-zero SP */
|
||||
movl %sp@(4),%a0 /* save area pointer */
|
||||
tstl %a0@(8) /* ensure non-zero SP */
|
||||
jeq botch /* oops! */
|
||||
movl sp@(8),d0 /* grab return value */
|
||||
movl %sp@(8),%d0 /* grab return value */
|
||||
jne ok /* non-zero ok */
|
||||
moveq #1,d0 /* else make non-zero */
|
||||
moveq #1,%d0 /* else make non-zero */
|
||||
ok:
|
||||
moveml a0@(28),#0x3CFC /* restore non-scratch regs */
|
||||
movl a0,sp@- /* let sigreturn */
|
||||
moveml %a0@(28),#0x3CFC /* restore non-scratch regs */
|
||||
movl %a0,%sp@- /* let sigreturn */
|
||||
jbsr PIC_PLT(_C_LABEL(sigreturn)) /* finish for us */
|
||||
|
||||
botch:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: sigsetjmp.S,v 1.5 1999/10/18 03:24:29 itohy Exp $ */
|
||||
/* $NetBSD: sigsetjmp.S,v 1.6 1999/10/25 23:48:12 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -43,7 +43,7 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)_setjmp.s 5.1 (Berkeley) 5/12/90")
|
||||
#else
|
||||
RCSID("$NetBSD: sigsetjmp.S,v 1.5 1999/10/18 03:24:29 itohy Exp $")
|
||||
RCSID("$NetBSD: sigsetjmp.S,v 1.6 1999/10/25 23:48:12 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
|
@ -62,10 +62,10 @@
|
|||
#include <m68k/setjmp.h>
|
||||
|
||||
ENTRY(sigsetjmp)
|
||||
movl sp@(8),d1 /* grab the mask */
|
||||
movl sp@(4),a0 /* grab the area pointer */
|
||||
movl d1,a0@(_JBLEN * 4 ) /* save at end of area */
|
||||
tstl d1
|
||||
movl %sp@(8),%d1 /* grab the mask */
|
||||
movl %sp@(4),%a0 /* grab the area pointer */
|
||||
movl %d1,%a0@(_JBLEN * 4 ) /* save at end of area */
|
||||
tstl %d1
|
||||
bne dosig
|
||||
jra PIC_PLT(_C_LABEL(_setjmp))
|
||||
dosig:
|
||||
|
@ -73,8 +73,8 @@ dosig:
|
|||
|
||||
|
||||
ENTRY(siglongjmp)
|
||||
movl sp@(4),a0 /* save area pointer */
|
||||
tstl a0@(_JBLEN * 4) /* check mask... */
|
||||
movl %sp@(4),%a0 /* save area pointer */
|
||||
tstl %a0@(_JBLEN * 4) /* check mask... */
|
||||
bne didsig
|
||||
jra PIC_PLT(_C_LABEL(_longjmp))
|
||||
didsig:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: subdf3.S,v 1.4 1999/05/02 20:17:21 kleink Exp $ */
|
||||
/* $NetBSD: subdf3.S,v 1.5 1999/10/25 23:48:12 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -43,17 +43,17 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)subdf3.s 5.1 (Berkeley) 6/7/90")
|
||||
#else
|
||||
RCSID("$NetBSD: subdf3.S,v 1.4 1999/05/02 20:17:21 kleink Exp $")
|
||||
RCSID("$NetBSD: subdf3.S,v 1.5 1999/10/25 23:48:12 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
/* double - double */
|
||||
ENTRY(__subdf3)
|
||||
fmoved sp@(4),fp0
|
||||
fsubd sp@(12),fp0
|
||||
fmoved %sp@(4),%fp0
|
||||
fsubd %sp@(12),%fp0
|
||||
#ifndef __SVR4_ABI__
|
||||
fmoved fp0,sp@-
|
||||
movel sp@+,d0
|
||||
movel sp@+,d1
|
||||
fmoved %fp0,%sp@-
|
||||
movel %sp@+,%d0
|
||||
movel %sp@+,%d1
|
||||
#endif
|
||||
rts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: subsf3.S,v 1.4 1999/05/02 20:17:21 kleink Exp $ */
|
||||
/* $NetBSD: subsf3.S,v 1.5 1999/10/25 23:48:12 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -43,15 +43,15 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)subsf3.s 5.1 (Berkeley) 6/7/90")
|
||||
#else
|
||||
RCSID("$NetBSD: subsf3.S,v 1.4 1999/05/02 20:17:21 kleink Exp $")
|
||||
RCSID("$NetBSD: subsf3.S,v 1.5 1999/10/25 23:48:12 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
/* single - single */
|
||||
ENTRY(__subsf3)
|
||||
fmoves sp@(4),fp0
|
||||
fsubs sp@(8),fp0
|
||||
fmoves %sp@(4),%fp0
|
||||
fsubs %sp@(8),%fp0
|
||||
#ifndef __SVR4_ABI__
|
||||
fmoves fp0,d0
|
||||
fmoves %fp0,%d0
|
||||
#endif
|
||||
rts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: truncdfsf2.S,v 1.4 1999/05/02 20:17:21 kleink Exp $ */
|
||||
/* $NetBSD: truncdfsf2.S,v 1.5 1999/10/25 23:48:12 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -43,14 +43,14 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)truncdfsf2.s 5.1 (Berkeley) 6/7/90")
|
||||
#else
|
||||
RCSID("$NetBSD: truncdfsf2.S,v 1.4 1999/05/02 20:17:21 kleink Exp $")
|
||||
RCSID("$NetBSD: truncdfsf2.S,v 1.5 1999/10/25 23:48:12 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
/* (float) double */
|
||||
ENTRY(__truncdfsf2)
|
||||
fmoved sp@(4),fp0
|
||||
fmoved %sp@(4),%fp0
|
||||
#ifndef __SVR4_ABI__
|
||||
fmoves fp0,d0
|
||||
fmoves %fp0,%d0
|
||||
#endif
|
||||
rts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: udivsi3.S,v 1.3 1997/04/25 00:59:03 thorpej Exp $ */
|
||||
/* $NetBSD: udivsi3.S,v 1.4 1999/10/25 23:48:12 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -43,12 +43,12 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)udivsi3.s 5.1 (Berkeley) 6/7/90")
|
||||
#else
|
||||
RCSID("$NetBSD: udivsi3.S,v 1.3 1997/04/25 00:59:03 thorpej Exp $")
|
||||
RCSID("$NetBSD: udivsi3.S,v 1.4 1999/10/25 23:48:12 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
/* unsigned / unsigned */
|
||||
ENTRY(__udivsi3)
|
||||
movel sp@(4),d0
|
||||
divul sp@(8),d0
|
||||
movel %sp@(4),%d0
|
||||
divul %sp@(8),%d0
|
||||
rts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: umodsi3.S,v 1.3 1997/04/25 00:59:04 thorpej Exp $ */
|
||||
/* $NetBSD: umodsi3.S,v 1.4 1999/10/25 23:48:12 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -43,12 +43,12 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)umodsi3.s 5.1 (Berkeley) 6/7/90")(
|
||||
#else
|
||||
RCSID("$NetBSD: umodsi3.S,v 1.3 1997/04/25 00:59:04 thorpej Exp $")
|
||||
RCSID("$NetBSD: umodsi3.S,v 1.4 1999/10/25 23:48:12 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
/* unsigned % unsigned */
|
||||
ENTRY(__umodsi3)
|
||||
movel sp@(4),d1
|
||||
divull sp@(8),d0:d1
|
||||
movel %sp@(4),%d1
|
||||
divull %sp@(8),%d0:%d1
|
||||
rts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: umulsi3.S,v 1.3 1997/04/25 00:59:05 thorpej Exp $ */
|
||||
/* $NetBSD: umulsi3.S,v 1.4 1999/10/25 23:48:12 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -43,12 +43,12 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)umulsi3.s 5.1 (Berkeley) 6/7/90")
|
||||
#else
|
||||
RCSID("$NetBSD: umulsi3.S,v 1.3 1997/04/25 00:59:05 thorpej Exp $")
|
||||
RCSID("$NetBSD: umulsi3.S,v 1.4 1999/10/25 23:48:12 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
/* unsigned * unsigned */
|
||||
ENTRY(__umulsi3)
|
||||
movel sp@(4),d0
|
||||
mulul sp@(8),d0
|
||||
movel %sp@(4),%d0
|
||||
mulul %sp@(8),%d0
|
||||
rts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: htonl.S,v 1.3 1997/04/25 01:00:45 thorpej Exp $ */
|
||||
/* $NetBSD: htonl.S,v 1.4 1999/10/25 23:48:13 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -43,12 +43,12 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)htonl.s 5.1 (Berkeley) 5/12/90")
|
||||
#else
|
||||
RCSID("$NetBSD: htonl.S,v 1.3 1997/04/25 01:00:45 thorpej Exp $")
|
||||
RCSID("$NetBSD: htonl.S,v 1.4 1999/10/25 23:48:13 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
/* netorder = htonl(hostorder) */
|
||||
|
||||
ENTRY(htonl)
|
||||
movl sp@(4),d0
|
||||
movl %sp@(4),%d0
|
||||
rts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: htons.S,v 1.3 1997/04/25 01:00:46 thorpej Exp $ */
|
||||
/* $NetBSD: htons.S,v 1.4 1999/10/25 23:48:13 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -43,13 +43,13 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)htons.s 5.1 (Berkeley) 5/12/90")
|
||||
#else
|
||||
RCSID("$NetBSD: htons.S,v 1.3 1997/04/25 01:00:46 thorpej Exp $")
|
||||
RCSID("$NetBSD: htons.S,v 1.4 1999/10/25 23:48:13 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
/* hostorder = htons(netorder) */
|
||||
|
||||
ENTRY(htons)
|
||||
clrl d0
|
||||
movw sp@(6),d0
|
||||
clrl %d0
|
||||
movw %sp@(6),%d0
|
||||
rts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ntohl.S,v 1.3 1997/04/25 01:00:47 thorpej Exp $ */
|
||||
/* $NetBSD: ntohl.S,v 1.4 1999/10/25 23:48:13 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -43,12 +43,12 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)ntohl.s 5.1 (Berkeley) 5/12/90")
|
||||
#else
|
||||
RCSID("$NetBSD: ntohl.S,v 1.3 1997/04/25 01:00:47 thorpej Exp $")
|
||||
RCSID("$NetBSD: ntohl.S,v 1.4 1999/10/25 23:48:13 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
/* hostorder = ntohl(netorder) */
|
||||
|
||||
ENTRY(ntohl)
|
||||
movl sp@(4),d0
|
||||
movl %sp@(4),%d0
|
||||
rts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ntohs.S,v 1.3 1997/04/25 01:00:47 thorpej Exp $ */
|
||||
/* $NetBSD: ntohs.S,v 1.4 1999/10/25 23:48:13 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -43,13 +43,13 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)ntohs.s 5.1 (Berkeley) 5/12/90")
|
||||
#else
|
||||
RCSID("$NetBSD: ntohs.S,v 1.3 1997/04/25 01:00:47 thorpej Exp $")
|
||||
RCSID("$NetBSD: ntohs.S,v 1.4 1999/10/25 23:48:13 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
/* hostorder = ntohs(netorder) */
|
||||
|
||||
ENTRY(ntohs)
|
||||
clrl d0
|
||||
movw sp@(6),d0
|
||||
clrl %d0
|
||||
movw %sp@(6),%d0
|
||||
rts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ashldi3.S,v 1.2 1997/07/30 23:50:37 jtc Exp $ */
|
||||
/* $NetBSD: ashldi3.S,v 1.3 1999/10/25 23:48:14 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||
|
@ -44,24 +44,24 @@
|
|||
| d3 offset (32 - shift)
|
||||
|
||||
ENTRY(__ashldi3)
|
||||
link a6,#0
|
||||
moveml d2-d4,sp@-
|
||||
movel a6@(8),d0
|
||||
movel a6@(12),d1
|
||||
movel a6@(16),d2
|
||||
moveq #32,d3
|
||||
subl d2,d3
|
||||
link %a6,#0
|
||||
moveml %d2-%d4,%sp@-
|
||||
movel %a6@(8),%d0
|
||||
movel %a6@(12),%d1
|
||||
movel %a6@(16),%d2
|
||||
moveq #32,%d3
|
||||
subl %d2,%d3
|
||||
jgt L2
|
||||
negl d3
|
||||
movel d1,d0
|
||||
asll d3,d0
|
||||
clrl d1
|
||||
negl %d3
|
||||
movel %d1,%d0
|
||||
asll %d3,%d0
|
||||
clrl %d1
|
||||
jra L3
|
||||
L2: asll d2,d0
|
||||
movel d1,d4
|
||||
lsrl d3,d4
|
||||
orl d4,d0
|
||||
asll d2,d1
|
||||
L3: moveml a6@(-12),d2-d4
|
||||
unlk a6
|
||||
L2: asll %d2,%d0
|
||||
movel %d1,%d4
|
||||
lsrl %d3,%d4
|
||||
orl %d4,%d0
|
||||
asll %d2,%d1
|
||||
L3: moveml %a6@(-12),%d2-%d4
|
||||
unlk %a6
|
||||
rts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ashrdi3.S,v 1.2 1997/07/30 23:50:40 jtc Exp $ */
|
||||
/* $NetBSD: ashrdi3.S,v 1.3 1999/10/25 23:48:14 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||
|
@ -44,25 +44,25 @@
|
|||
| d3 offset (32 - shift)
|
||||
|
||||
ENTRY(__ashrdi3)
|
||||
link a6,#0
|
||||
moveml d2-d4,sp@-
|
||||
movel a6@(8),d0
|
||||
movel a6@(12),d1
|
||||
movel a6@(16),d2
|
||||
moveq #32,d3
|
||||
subl d2,d3
|
||||
link %a6,#0
|
||||
moveml %d2-%d4,%sp@-
|
||||
movel %a6@(8),%d0
|
||||
movel %a6@(12),%d1
|
||||
movel %a6@(16),%d2
|
||||
moveq #32,%d3
|
||||
subl %d2,%d3
|
||||
jgt L2
|
||||
negl d3
|
||||
movel d0,d1
|
||||
asrl d3,d1
|
||||
smi d0
|
||||
extbl d0
|
||||
negl %d3
|
||||
movel %d0,%d1
|
||||
asrl %d3,%d1
|
||||
smi %d0
|
||||
extbl %d0
|
||||
jra L3
|
||||
L2: lsrl d2,d1
|
||||
movel d0,d4
|
||||
asll d3,d4
|
||||
orl d4,d1
|
||||
asrl d2,d0
|
||||
L3: moveml a6@(-12),d2-d4
|
||||
unlk a6
|
||||
L2: lsrl %d2,%d1
|
||||
movel %d0,%d4
|
||||
asll %d3,%d4
|
||||
orl %d4,%d1
|
||||
asrl %d2,%d0
|
||||
L3: moveml %a6@(-12),%d2-%d4
|
||||
unlk %a6
|
||||
rts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: lshrdi3.S,v 1.2 1997/07/30 23:50:42 jtc Exp $ */
|
||||
/* $NetBSD: lshrdi3.S,v 1.3 1999/10/25 23:48:14 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||
|
@ -44,24 +44,24 @@
|
|||
| d3 offset (32 - shift)
|
||||
|
||||
ENTRY(__lshrdi3)
|
||||
link a6,#0
|
||||
moveml d2-d4,sp@-
|
||||
movel a6@(8),d0
|
||||
movel a6@(12),d1
|
||||
movel a6@(16),d2
|
||||
moveq #32,d3
|
||||
subl d2,d3
|
||||
link %a6,#0
|
||||
moveml %d2-d4,%sp@-
|
||||
movel %a6@(8),%d0
|
||||
movel %a6@(12),%d1
|
||||
movel %a6@(16),%d2
|
||||
moveq #32,%d3
|
||||
subl %d2,%d3
|
||||
jgt L2
|
||||
negl d3
|
||||
movel d0,d1
|
||||
lsrl d3,d1
|
||||
clrl d0
|
||||
negl %d3
|
||||
movel %d0,%d1
|
||||
lsrl %d3,%d1
|
||||
clrl %d0
|
||||
jra L3
|
||||
L2: lsrl d2,d1
|
||||
movel d0,d4
|
||||
asll d3,d4
|
||||
orl d4,d1
|
||||
lsrl d2,d0
|
||||
L3: moveml a6@(-12),d2-d4
|
||||
unlk a6
|
||||
L2: lsrl %d2,%d1
|
||||
movel %d0,%d4
|
||||
asll %d3,%d4
|
||||
orl %d4,%d1
|
||||
lsrl %d2,%d0
|
||||
L3: moveml %a6@(-12),%d2-%d4
|
||||
unlk %a6
|
||||
rts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: abs.S,v 1.3 1997/04/25 01:02:01 thorpej Exp $ */
|
||||
/* $NetBSD: abs.S,v 1.4 1999/10/25 23:48:14 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -43,15 +43,15 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)abs.s 5.1 (Berkeley) 5/12/90")
|
||||
#else
|
||||
RCSID("$NetBSD: abs.S,v 1.3 1997/04/25 01:02:01 thorpej Exp $")
|
||||
RCSID("$NetBSD: abs.S,v 1.4 1999/10/25 23:48:14 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
/* abs - int absolute value */
|
||||
|
||||
ENTRY(abs)
|
||||
movl sp@(4),d0
|
||||
movl %sp@(4),%d0
|
||||
jge L1
|
||||
negl d0
|
||||
negl %d0
|
||||
L1:
|
||||
rts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: bcmp.S,v 1.10 1997/05/15 16:17:20 jtc Exp $ */
|
||||
/* $NetBSD: bcmp.S,v 1.11 1999/10/25 23:48:14 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997 The NetBSD Foundation, Inc.
|
||||
|
@ -79,88 +79,88 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)bcmp.s 5.1 (Berkeley) 5/12/90")
|
||||
#else
|
||||
RCSID("$NetBSD: bcmp.S,v 1.10 1997/05/15 16:17:20 jtc Exp $")
|
||||
RCSID("$NetBSD: bcmp.S,v 1.11 1999/10/25 23:48:14 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
ENTRY(bcmp)
|
||||
movl sp@(4),a0 | string 1
|
||||
movl sp@(8),a1 | string 2
|
||||
movl sp@(12),d1 | length
|
||||
movl %sp@(4),%a0 | string 1
|
||||
movl %sp@(8),%a1 | string 2
|
||||
movl %sp@(12),%d1 | length
|
||||
|
||||
/*
|
||||
* It isn't worth the overhead of aligning to {long}word boundries
|
||||
* if the string is too short.
|
||||
*/
|
||||
cmpl #8,d1
|
||||
cmpl #8,%d1
|
||||
jlt Lbcbyte
|
||||
|
||||
/* word align */
|
||||
movl a0,d0
|
||||
btst #0,d0
|
||||
movl %a0,%d0
|
||||
btst #0,%d0
|
||||
jeq Lbcalgndw
|
||||
cmpmb a0@+,a1@+
|
||||
cmpmb %a0@+,%a1@+
|
||||
jne Lbcnoteq
|
||||
subql #1,d1
|
||||
subql #1,%d1
|
||||
Lbcalgndw:
|
||||
/* long word align */
|
||||
btst #1,d0
|
||||
btst #1,%d0
|
||||
jeq Lbcalgndl
|
||||
cmpmw a0@+,a1@+
|
||||
cmpmw %a0@+,%a1@+
|
||||
jne Lbcnoteq
|
||||
subql #2,d1
|
||||
subql #2,%d1
|
||||
Lbcalgndl:
|
||||
/* compare by 8 longwords */
|
||||
movl d1,d0
|
||||
lsrl #5,d0 | cnt = len / 32
|
||||
movl %d1,%d0
|
||||
lsrl #5,%d0 | cnt = len / 32
|
||||
jeq Lbclong | if (cnt)
|
||||
andl #31,d1 | len %= 32
|
||||
subql #1,d0 | set up for dbf
|
||||
andl #31,%d1 | len %= 32
|
||||
subql #1,%d0 | set up for dbf
|
||||
Lbc32loop:
|
||||
cmpml a0@+,a1@+ | compare 8 longwords
|
||||
cmpml %a0@+,%a1@+ | compare 8 longwords
|
||||
jne Lbcnoteq | not equal, return non-zero
|
||||
cmpml a0@+,a1@+
|
||||
cmpml %a0@+,%a1@+
|
||||
jne Lbcnoteq
|
||||
cmpml a0@+,a1@+
|
||||
cmpml %a0@+,%a1@+
|
||||
jne Lbcnoteq
|
||||
cmpml a0@+,a1@+
|
||||
cmpml %a0@+,%a1@+
|
||||
jne Lbcnoteq
|
||||
cmpml a0@+,a1@+
|
||||
cmpml %a0@+,%a1@+
|
||||
jne Lbcnoteq
|
||||
cmpml a0@+,a1@+
|
||||
cmpml %a0@+,%a1@+
|
||||
jne Lbcnoteq
|
||||
cmpml a0@+,a1@+
|
||||
cmpml %a0@+,%a1@+
|
||||
jne Lbcnoteq
|
||||
cmpml a0@+,a1@+
|
||||
cmpml %a0@+,%a1@+
|
||||
jne Lbcnoteq
|
||||
dbf d0,Lbc32loop | till done
|
||||
clrw d0
|
||||
subql #1,d0
|
||||
dbf %d0,Lbc32loop | till done
|
||||
clrw %d0
|
||||
subql #1,%d0
|
||||
jcc Lbc32loop
|
||||
|
||||
Lbclong:
|
||||
/* compare by longwords */
|
||||
movl d1,d0
|
||||
lsrl #2,d0 | cnt = len / 4
|
||||
movl %d1,%d0
|
||||
lsrl #2,%d0 | cnt = len / 4
|
||||
jeq Lbcbyte | if (cnt)
|
||||
subql #1,d0 | set up for dbf
|
||||
subql #1,%d0 | set up for dbf
|
||||
Lbclloop:
|
||||
cmpml a0@+,a1@+ | compare a longword
|
||||
cmpml %a0@+,%a1@+ | compare a longword
|
||||
jne Lbcnoteq | not equal, return non-zero
|
||||
dbf d0,Lbclloop | till done
|
||||
andl #3,d1 | len %= 4
|
||||
dbf %d0,Lbclloop | till done
|
||||
andl #3,%d1 | len %= 4
|
||||
jeq Lbcdone
|
||||
|
||||
subql #1,d1 | set up for dbf
|
||||
subql #1,%d1 | set up for dbf
|
||||
Lbcbloop:
|
||||
cmpmb a0@+,a1@+ | compare a byte
|
||||
cmpmb %a0@+,%a1@+ | compare a byte
|
||||
jne Lbcnoteq | not equal, return non-zero
|
||||
Lbcbyte:
|
||||
dbf d1,Lbcbloop
|
||||
dbf %d1,Lbcbloop
|
||||
Lbcdone:
|
||||
movql #0,d0
|
||||
movql #0,%d0
|
||||
rts
|
||||
|
||||
Lbcnoteq:
|
||||
movql #1,d0
|
||||
movql #1,%d0
|
||||
rts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: bcopy.S,v 1.14 1999/05/02 20:34:04 kleink Exp $ */
|
||||
/* $NetBSD: bcopy.S,v 1.15 1999/10/25 23:48:14 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997 The NetBSD Foundation, Inc.
|
||||
|
@ -79,7 +79,7 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)bcopy.s 5.1 (Berkeley) 5/12/90")
|
||||
#else
|
||||
RCSID("$NetBSD: bcopy.S,v 1.14 1999/05/02 20:34:04 kleink Exp $")
|
||||
RCSID("$NetBSD: bcopy.S,v 1.15 1999/10/25 23:48:14 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
|
@ -94,150 +94,150 @@ ENTRY(bcopy)
|
|||
#endif
|
||||
#endif
|
||||
#if defined(MEMCOPY) || defined(MEMMOVE)
|
||||
movl sp@(4),a1 | dest address
|
||||
movl sp@(8),a0 | src address
|
||||
movl %sp@(4),%a1 | dest address
|
||||
movl %sp@(8),%a0 | src address
|
||||
#else
|
||||
movl sp@(4),a0 | src address
|
||||
movl sp@(8),a1 | dest address
|
||||
movl %sp@(4),%a0 | src address
|
||||
movl %sp@(8),%a1 | dest address
|
||||
#endif
|
||||
movl sp@(12),d1 | count
|
||||
movl %sp@(12),%d1 | count
|
||||
|
||||
cmpl a1,a0 | src after dest?
|
||||
cmpl %a1,%a0 | src after dest?
|
||||
jlt Lbcback | yes, must copy backwards
|
||||
|
||||
/*
|
||||
* It isn't worth the overhead of aligning to {long}word boundries
|
||||
* if the string is too short.
|
||||
*/
|
||||
cmpl #8,d1
|
||||
cmpl #8,%d1
|
||||
jlt Lbcfbyte
|
||||
|
||||
/* word align */
|
||||
movl a1,d0
|
||||
btst #0,d0 | if (dst & 1)
|
||||
movl %a1,%d0
|
||||
btst #0,%d0 | if (dst & 1)
|
||||
jeq Lbcfalgndw |
|
||||
movb a0@+,a1@+ | *(char *)dst++ = *(char *) src++
|
||||
subql #1,d1 | len--
|
||||
movb %a0@+,%a1@+ | *(char *)dst++ = *(char *) src++
|
||||
subql #1,%d1 | len--
|
||||
Lbcfalgndw:
|
||||
/* long word align */
|
||||
btst #1,d0 | if (dst & 2)
|
||||
btst #1,%d0 | if (dst & 2)
|
||||
jeq Lbcfalgndl
|
||||
movw a0@+,a1@+ | *(short *)dst++ = *(short *) dst++
|
||||
subql #2,d1 | len -= 2
|
||||
movw %a0@+,%a1@+ | *(short *)dst++ = *(short *) dst++
|
||||
subql #2,%d1 | len -= 2
|
||||
Lbcfalgndl:
|
||||
/* copy by 8 longwords */
|
||||
movel d1,d0
|
||||
lsrl #5,d0 | cnt = len / 32
|
||||
movel %d1,%d0
|
||||
lsrl #5,%d0 | cnt = len / 32
|
||||
jeq Lbcflong | if (cnt)
|
||||
andl #31,d1 | len %= 32
|
||||
subql #1,d0 | set up for dbf
|
||||
andl #31,%d1 | len %= 32
|
||||
subql #1,%d0 | set up for dbf
|
||||
Lbcf32loop:
|
||||
movl a0@+,a1@+ | copy 8 long words
|
||||
movl a0@+,a1@+
|
||||
movl a0@+,a1@+
|
||||
movl a0@+,a1@+
|
||||
movl a0@+,a1@+
|
||||
movl a0@+,a1@+
|
||||
movl a0@+,a1@+
|
||||
movl a0@+,a1@+
|
||||
dbf d0,Lbcf32loop | till done
|
||||
clrw d0
|
||||
subql #1,d0
|
||||
movl %a0@+,%a1@+ | copy 8 long words
|
||||
movl %a0@+,%a1@+
|
||||
movl %a0@+,%a1@+
|
||||
movl %a0@+,%a1@+
|
||||
movl %a0@+,%a1@+
|
||||
movl %a0@+,%a1@+
|
||||
movl %a0@+,%a1@+
|
||||
movl %a0@+,%a1@+
|
||||
dbf %d0,Lbcf32loop | till done
|
||||
clrw %d0
|
||||
subql #1,%d0
|
||||
jcc Lbcf32loop
|
||||
|
||||
Lbcflong:
|
||||
/* copy by longwords */
|
||||
movel d1,d0
|
||||
lsrl #2,d0 | cnt = len / 4
|
||||
movel %d1,%d0
|
||||
lsrl #2,%d0 | cnt = len / 4
|
||||
jeq Lbcfbyte | if (cnt)
|
||||
subql #1,d0 | set up for dbf
|
||||
subql #1,%d0 | set up for dbf
|
||||
Lbcflloop:
|
||||
movl a0@+,a1@+ | copy longwords
|
||||
dbf d0,Lbcflloop | til done
|
||||
andl #3,d1 | len %= 4
|
||||
movl %a0@+,%a1@+ | copy longwords
|
||||
dbf %d0,Lbcflloop | til done
|
||||
andl #3,%d1 | len %= 4
|
||||
jeq Lbcdone
|
||||
|
||||
subql #1,d1 | set up for dbf
|
||||
subql #1,%d1 | set up for dbf
|
||||
Lbcfbloop:
|
||||
movb a0@+,a1@+ | copy bytes
|
||||
movb %a0@+,%a1@+ | copy bytes
|
||||
Lbcfbyte:
|
||||
dbf d1,Lbcfbloop | till done
|
||||
dbf %d1,Lbcfbloop | till done
|
||||
Lbcdone:
|
||||
#if defined(MEMCOPY) || defined(MEMMOVE)
|
||||
movl sp@(4),d0 | dest address
|
||||
movl %sp@(4),%d0 | dest address
|
||||
#if defined(__SVR4_ABI__)
|
||||
moveal d0,a0
|
||||
moveal %d0,%a0
|
||||
#endif
|
||||
#endif
|
||||
rts
|
||||
|
||||
|
||||
Lbcback:
|
||||
addl d1,a0 | src pointer to end
|
||||
addl d1,a1 | dest pointer to end
|
||||
addl %d1,%a0 | src pointer to end
|
||||
addl %d1,%a1 | dest pointer to end
|
||||
|
||||
/*
|
||||
* It isn't worth the overhead of aligning to {long}word boundries
|
||||
* if the string is too short.
|
||||
*/
|
||||
cmpl #8,d1
|
||||
cmpl #8,%d1
|
||||
jlt Lbcbbyte
|
||||
|
||||
/* word align */
|
||||
movl a1,d0
|
||||
btst #0,d0 | if (dst & 1)
|
||||
movl %a1,%d0
|
||||
btst #0,%d0 | if (dst & 1)
|
||||
jeq Lbcbalgndw |
|
||||
movb a0@-,a1@- | *(char *)dst-- = *(char *) src--
|
||||
subql #1,d1 | len--
|
||||
movb %a0@-,%a1@- | *(char *)dst-- = *(char *) src--
|
||||
subql #1,%d1 | len--
|
||||
Lbcbalgndw:
|
||||
/* long word align */
|
||||
btst #1,d0 | if (dst & 2)
|
||||
btst #1,%d0 | if (dst & 2)
|
||||
jeq Lbcbalgndl
|
||||
movw a0@-,a1@- | *(short *)dst-- = *(short *) dst--
|
||||
subql #2,d1 | len -= 2
|
||||
movw %a0@-,%a1@- | *(short *)dst-- = *(short *) dst--
|
||||
subql #2,%d1 | len -= 2
|
||||
Lbcbalgndl:
|
||||
/* copy by 8 longwords */
|
||||
movel d1,d0
|
||||
lsrl #5,d0 | cnt = len / 32
|
||||
movel %d1,%d0
|
||||
lsrl #5,%d0 | cnt = len / 32
|
||||
jeq Lbcblong | if (cnt)
|
||||
andl #31,d1 | len %= 32
|
||||
subql #1,d0 | set up for dbf
|
||||
andl #31,%d1 | len %= 32
|
||||
subql #1,%d0 | set up for dbf
|
||||
Lbcb32loop:
|
||||
movl a0@-,a1@- | copy 8 long words
|
||||
movl a0@-,a1@-
|
||||
movl a0@-,a1@-
|
||||
movl a0@-,a1@-
|
||||
movl a0@-,a1@-
|
||||
movl a0@-,a1@-
|
||||
movl a0@-,a1@-
|
||||
movl a0@-,a1@-
|
||||
dbf d0,Lbcb32loop | till done
|
||||
clrw d0
|
||||
subql #1,d0
|
||||
movl %a0@-,%a1@- | copy 8 long words
|
||||
movl %a0@-,%a1@-
|
||||
movl %a0@-,%a1@-
|
||||
movl %a0@-,%a1@-
|
||||
movl %a0@-,%a1@-
|
||||
movl %a0@-,%a1@-
|
||||
movl %a0@-,%a1@-
|
||||
movl %a0@-,%a1@-
|
||||
dbf %d0,Lbcb32loop | till done
|
||||
clrw %d0
|
||||
subql #1,%d0
|
||||
jcc Lbcb32loop
|
||||
|
||||
Lbcblong:
|
||||
/* copy by longwords */
|
||||
movel d1,d0
|
||||
lsrl #2,d0 | cnt = len / 4
|
||||
movel %d1,%d0
|
||||
lsrl #2,%d0 | cnt = len / 4
|
||||
jeq Lbcbbyte | if (cnt)
|
||||
subql #1,d0 | set up for dbf
|
||||
subql #1,%d0 | set up for dbf
|
||||
Lbcblloop:
|
||||
movl a0@-,a1@- | copy longwords
|
||||
dbf d0,Lbcblloop | til done
|
||||
andl #3,d1 | len %= 4
|
||||
movl %a0@-,%a1@- | copy longwords
|
||||
dbf %d0,Lbcblloop | til done
|
||||
andl #3,%d1 | len %= 4
|
||||
jeq Lbcdone
|
||||
|
||||
subql #1,d1 | set up for dbf
|
||||
subql #1,%d1 | set up for dbf
|
||||
Lbcbbloop:
|
||||
movb a0@-,a1@- | copy bytes
|
||||
movb %a0@-,%a1@- | copy bytes
|
||||
Lbcbbyte:
|
||||
dbf d1,Lbcbbloop | till done
|
||||
dbf %d1,Lbcbbloop | till done
|
||||
|
||||
#if defined(MEMCOPY) || defined(MEMMOVE)
|
||||
movl sp@(4),d0 | dest address
|
||||
movl %sp@(4),%d0 | dest address
|
||||
#if defined(__SVR4_ABI__)
|
||||
moveal d0,a0
|
||||
moveal %d0,%a0
|
||||
#endif
|
||||
#endif
|
||||
rts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: bzero.S,v 1.9 1997/05/13 19:27:23 jtc Exp $ */
|
||||
/* $NetBSD: bzero.S,v 1.10 1999/10/25 23:48:14 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997 The NetBSD Foundation, Inc.
|
||||
|
@ -79,74 +79,74 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)bzero.s 5.1 (Berkeley) 5/12/90")
|
||||
#else
|
||||
RCSID("$NetBSD: bzero.S,v 1.9 1997/05/13 19:27:23 jtc Exp $")
|
||||
RCSID("$NetBSD: bzero.S,v 1.10 1999/10/25 23:48:14 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
ENTRY(bzero)
|
||||
movl d2,sp@-
|
||||
movl sp@(8),a0 | destination
|
||||
movl sp@(12),d1 | count
|
||||
movl %d2,%sp@-
|
||||
movl %sp@(8),%a0 | destination
|
||||
movl %sp@(12),%d1 | count
|
||||
|
||||
movql #0,d2
|
||||
movql #0,%d2
|
||||
|
||||
/*
|
||||
* It isn't worth the overhead of aligning to {long}word boundries
|
||||
* if the string is too short.
|
||||
*/
|
||||
cmpl #8,d1
|
||||
cmpl #8,%d1
|
||||
jlt Lbzbyte
|
||||
|
||||
/* word align */
|
||||
movl a0,d0
|
||||
btst #0,d0 | if (dst & 1)
|
||||
movl %a0,%d0
|
||||
btst #0,%d0 | if (dst & 1)
|
||||
jeq Lbzalgndw |
|
||||
movb d2,a0@+ | *(char *)dst++ = 0
|
||||
subql #1,d1 | len--
|
||||
movb %d2,%a0@+ | *(char *)dst++ = 0
|
||||
subql #1,%d1 | len--
|
||||
Lbzalgndw:
|
||||
/* long word align */
|
||||
btst #1,d0 | if (dst & 2)
|
||||
btst #1,%d0 | if (dst & 2)
|
||||
jeq Lbzalgndl |
|
||||
movw d2,a0@+ | *(short *)dst++ = 0
|
||||
subql #2,d1 | len -= 2
|
||||
movw %d2,%a0@+ | *(short *)dst++ = 0
|
||||
subql #2,%d1 | len -= 2
|
||||
Lbzalgndl:
|
||||
/* zero by 8 longwords */
|
||||
movel d1,d0
|
||||
lsrl #5,d0 | cnt = len / 32
|
||||
movel %d1,%d0
|
||||
lsrl #5,%d0 | cnt = len / 32
|
||||
jeq Lbzlong | if (cnt)
|
||||
andl #31,d1 | len %= 32
|
||||
subql #1,d0 | set up for dbf
|
||||
andl #31,%d1 | len %= 32
|
||||
subql #1,%d0 | set up for dbf
|
||||
Lbz32loop:
|
||||
movl d2,a0@+ | zero 8 long words
|
||||
movl d2,a0@+
|
||||
movl d2,a0@+
|
||||
movl d2,a0@+
|
||||
movl d2,a0@+
|
||||
movl d2,a0@+
|
||||
movl d2,a0@+
|
||||
movl d2,a0@+
|
||||
dbf d0,Lbz32loop | till done
|
||||
clrw d0
|
||||
subql #1,d0
|
||||
movl %d2,%a0@+ | zero 8 long words
|
||||
movl %d2,%a0@+
|
||||
movl %d2,%a0@+
|
||||
movl %d2,%a0@+
|
||||
movl %d2,%a0@+
|
||||
movl %d2,%a0@+
|
||||
movl %d2,%a0@+
|
||||
movl %d2,%a0@+
|
||||
dbf %d0,Lbz32loop | till done
|
||||
clrw %d0
|
||||
subql #1,%d0
|
||||
jcc Lbz32loop
|
||||
|
||||
Lbzlong:
|
||||
/* copy by longwords */
|
||||
movel d1,d0
|
||||
lsrl #2,d0 | cnt = len / 4
|
||||
movel %d1,%d0
|
||||
lsrl #2,%d0 | cnt = len / 4
|
||||
jeq Lbzbyte | if (cnt)
|
||||
subql #1,d0 | set up for dbf
|
||||
subql #1,%d0 | set up for dbf
|
||||
Lbzlloop:
|
||||
movl d2,a0@+ | clear longwords
|
||||
dbf d0,Lbzlloop | till done
|
||||
andl #3,d1 | len %= 4
|
||||
movl %d2,%a0@+ | clear longwords
|
||||
dbf %d0,Lbzlloop | till done
|
||||
andl #3,%d1 | len %= 4
|
||||
jeq Lbzdone
|
||||
|
||||
subql #1,d1 | set up for dbf
|
||||
subql #1,%d1 | set up for dbf
|
||||
Lbzbloop:
|
||||
movb d2,a0@+ | zero bytes
|
||||
movb %d2,%a0@+ | zero bytes
|
||||
Lbzbyte:
|
||||
dbf d1,Lbzbloop | till done
|
||||
dbf %d1,Lbzbloop | till done
|
||||
Lbzdone:
|
||||
movl sp@+,d2
|
||||
movl %sp@+,%d2
|
||||
rts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ffs.S,v 1.6 1997/01/04 03:26:21 jtc Exp $ */
|
||||
/* $NetBSD: ffs.S,v 1.7 1999/10/25 23:48:15 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -43,18 +43,18 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)ffs.s 5.1 (Berkeley) 5/12/90")
|
||||
#else
|
||||
RCSID("$NetBSD: ffs.S,v 1.6 1997/01/04 03:26:21 jtc Exp $")
|
||||
RCSID("$NetBSD: ffs.S,v 1.7 1999/10/25 23:48:15 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
/* bit = ffs(value) */
|
||||
|
||||
ENTRY(ffs)
|
||||
movl sp@(4),d0
|
||||
movl d0,d1
|
||||
negl d0
|
||||
andl d0,d1
|
||||
movql #32,d0
|
||||
bfffo d1{#0:#32},d1
|
||||
subl d1,d0
|
||||
movl %sp@(4),%d0
|
||||
movl %d0,%d1
|
||||
negl %d0
|
||||
andl %d0,%d1
|
||||
movql #32,%d0
|
||||
bfffo %d1{#0:#32},%d1
|
||||
subl %d1,%d0
|
||||
rts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: index.S,v 1.8 1999/05/02 20:34:04 kleink Exp $ */
|
||||
/* $NetBSD: index.S,v 1.9 1999/10/25 23:48:15 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -43,7 +43,7 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)index.s 5.1 (Berkeley) 5/12/90")
|
||||
#else
|
||||
RCSID("$NetBSD: index.S,v 1.8 1999/05/02 20:34:04 kleink Exp $")
|
||||
RCSID("$NetBSD: index.S,v 1.9 1999/10/25 23:48:15 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
|
@ -52,18 +52,18 @@ ENTRY(strchr)
|
|||
#else
|
||||
ENTRY(index)
|
||||
#endif
|
||||
movl sp@(4),a0 | string
|
||||
movb sp@(11),d0 | char to look for
|
||||
movl %sp@(4),%a0 | string
|
||||
movb %sp@(11),%d0 | char to look for
|
||||
ixloop:
|
||||
cmpb a0@,d0 | found our char?
|
||||
cmpb %a0@,%d0 | found our char?
|
||||
jeq ixfound | yes, break out
|
||||
tstb a0@+ | null?
|
||||
tstb %a0@+ | null?
|
||||
jne ixloop | no, keep going
|
||||
moveq #0,d0 | not found, return null
|
||||
moveq #0,%d0 | not found, return null
|
||||
#ifdef __SVR4_ABI__
|
||||
moveal d0,a0
|
||||
moveal %d0,%a0
|
||||
#endif
|
||||
rts
|
||||
ixfound:
|
||||
movl a0,d0 | found, return pointer
|
||||
movl %a0,%d0 | found, return pointer
|
||||
rts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: memcmp.S,v 1.9 1997/05/13 19:27:24 jtc Exp $ */
|
||||
/* $NetBSD: memcmp.S,v 1.10 1999/10/25 23:48:15 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -43,7 +43,7 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)bcmp.s 5.1 (Berkeley) 5/12/90")
|
||||
#else
|
||||
RCSID("$NetBSD: memcmp.S,v 1.9 1997/05/13 19:27:24 jtc Exp $")
|
||||
RCSID("$NetBSD: memcmp.S,v 1.10 1999/10/25 23:48:15 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
|
@ -58,47 +58,47 @@
|
|||
* - use nested DBcc instructions or use one and limit size to 64K
|
||||
*/
|
||||
ENTRY(memcmp)
|
||||
movl sp@(4),a0 | string 1
|
||||
movl sp@(8),a1 | string 2
|
||||
movl sp@(12),d0 | length
|
||||
movl %sp@(4),%a0 | string 1
|
||||
movl %sp@(8),%a1 | string 2
|
||||
movl %sp@(12),%d0 | length
|
||||
jeq bcdone | if zero, nothing to do
|
||||
movl a0,d1
|
||||
btst #0,d1 | string 1 address odd?
|
||||
movl %a0,%d1
|
||||
btst #0,%d1 | string 1 address odd?
|
||||
jeq bceven | no, skip alignment
|
||||
cmpmb a0@+,a1@+ | yes, compare a byte
|
||||
cmpmb %a0@+,%a1@+ | yes, compare a byte
|
||||
jne bcnoteq | not equal, return non-zero
|
||||
subql #1,d0 | adjust count
|
||||
subql #1,%d0 | adjust count
|
||||
jeq bcdone | count 0, reutrn zero
|
||||
bceven:
|
||||
movl a1,d1
|
||||
btst #0,d1 | string 2 address odd?
|
||||
movl %a1,%d1
|
||||
btst #0,%d1 | string 2 address odd?
|
||||
jne bcbloop | yes, no hope for alignment, compare bytes
|
||||
movl d0,d1 | no, both even
|
||||
lsrl #2,d1 | convert count to longword count
|
||||
movl %d0,%d1 | no, both even
|
||||
lsrl #2,%d1 | convert count to longword count
|
||||
jeq bcbloop | count 0, skip longword loop
|
||||
bclloop:
|
||||
cmpml a0@+,a1@+ | compare a longword
|
||||
cmpml %a0@+,%a1@+ | compare a longword
|
||||
jne bcnoteql | not equal, return non-zero
|
||||
subql #1,d1 | adjust count
|
||||
subql #1,%d1 | adjust count
|
||||
jne bclloop | still more, keep comparing
|
||||
andl #3,d0 | what remains
|
||||
andl #3,%d0 | what remains
|
||||
jeq bcdone | nothing, all done
|
||||
bcbloop:
|
||||
cmpmb a0@+,a1@+ | compare a byte
|
||||
cmpmb %a0@+,%a1@+ | compare a byte
|
||||
jne bcnoteq | not equal, return non-zero
|
||||
subql #1,d0 | adjust count
|
||||
subql #1,%d0 | adjust count
|
||||
jne bcbloop | still more, keep going
|
||||
rts
|
||||
bcnoteql:
|
||||
subql #4,a0
|
||||
subql #4,a1
|
||||
movl #4,d0
|
||||
subql #4,%a0
|
||||
subql #4,%a1
|
||||
movl #4,%d0
|
||||
jra bcbloop
|
||||
bcnoteq:
|
||||
clrl d0
|
||||
clrl d1
|
||||
movb a0@-,d0
|
||||
movb a1@-,d1
|
||||
subl d1,d0
|
||||
clrl %d0
|
||||
clrl %d1
|
||||
movb %a0@-,%d0
|
||||
movb %a1@-,%d1
|
||||
subl %d1,%d0
|
||||
bcdone:
|
||||
rts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: memset.S,v 1.11 1999/05/02 20:34:04 kleink Exp $ */
|
||||
/* $NetBSD: memset.S,v 1.12 1999/10/25 23:48:15 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997 The NetBSD Foundation, Inc.
|
||||
|
@ -79,87 +79,87 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)bzero.s 5.1 (Berkeley) 5/12/90")
|
||||
#else
|
||||
RCSID("$NetBSD: memset.S,v 1.11 1999/05/02 20:34:04 kleink Exp $")
|
||||
RCSID("$NetBSD: memset.S,v 1.12 1999/10/25 23:48:15 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
ENTRY(memset)
|
||||
movl d2,sp@-
|
||||
movl sp@(8),a0 | destination
|
||||
movl sp@(16),d1 | count
|
||||
movb sp@(15),d2 | character
|
||||
movl %d2,%sp@-
|
||||
movl %sp@(8),%a0 | destination
|
||||
movl %sp@(16),%d1 | count
|
||||
movb %sp@(15),%d2 | character
|
||||
|
||||
/*
|
||||
* It isn't worth the overhead of aligning to {long}word boundries
|
||||
* if the string is too short.
|
||||
*/
|
||||
cmpl #15,d1
|
||||
cmpl #15,%d1
|
||||
jlt Lbzbyte
|
||||
|
||||
clrl d0 | replicate byte to fill longword
|
||||
movb d2,d0
|
||||
movl d0,d2
|
||||
lsll #8,d0
|
||||
orl d0,d2
|
||||
lsll #8,d0
|
||||
orl d0,d2
|
||||
lsll #8,d0
|
||||
orl d0,d2
|
||||
clrl %d0 | replicate byte to fill longword
|
||||
movb %d2,%d0
|
||||
movl %d0,%d2
|
||||
lsll #8,%d0
|
||||
orl %d0,%d2
|
||||
lsll #8,%d0
|
||||
orl %d0,%d2
|
||||
lsll #8,%d0
|
||||
orl %d0,%d2
|
||||
|
||||
/* word align */
|
||||
movl a0,d0
|
||||
btst #0,d0 | if (dst & 1)
|
||||
movl %a0,%d0
|
||||
btst #0,%d0 | if (dst & 1)
|
||||
jeq Lbzalgndw |
|
||||
movb d2,a0@+ | *(char *)dst++ = X
|
||||
subql #1,d1 | len--
|
||||
movb %d2,%a0@+ | *(char *)dst++ = X
|
||||
subql #1,%d1 | len--
|
||||
Lbzalgndw:
|
||||
/* long word align */
|
||||
btst #1,d0 | if (dst & 2)
|
||||
btst #1,%d0 | if (dst & 2)
|
||||
jeq Lbzalgndl |
|
||||
movw d2,a0@+ | *(short *)dst++ = X
|
||||
subql #2,d1 | len -= 2
|
||||
movw %d2,%a0@+ | *(short *)dst++ = X
|
||||
subql #2,%d1 | len -= 2
|
||||
Lbzalgndl:
|
||||
/* set by 8 longwords */
|
||||
movel d1,d0
|
||||
lsrl #5,d0 | cnt = len / 32
|
||||
movel %d1,%d0
|
||||
lsrl #5,%d0 | cnt = len / 32
|
||||
jeq Lbzlong | if (cnt)
|
||||
andl #31,d1 | len %= 32
|
||||
subql #1,d0 | set up for dbf
|
||||
andl #31,%d1 | len %= 32
|
||||
subql #1,%d0 | set up for dbf
|
||||
Lbz32loop:
|
||||
movl d2,a0@+ | set 8 long words
|
||||
movl d2,a0@+
|
||||
movl d2,a0@+
|
||||
movl d2,a0@+
|
||||
movl d2,a0@+
|
||||
movl d2,a0@+
|
||||
movl d2,a0@+
|
||||
movl d2,a0@+
|
||||
dbf d0,Lbz32loop | till done
|
||||
clrw d0
|
||||
subql #1,d0
|
||||
movl %d2,%a0@+ | set 8 long words
|
||||
movl %d2,%a0@+
|
||||
movl %d2,%a0@+
|
||||
movl %d2,%a0@+
|
||||
movl %d2,%a0@+
|
||||
movl %d2,%a0@+
|
||||
movl %d2,%a0@+
|
||||
movl %d2,%a0@+
|
||||
dbf %d0,Lbz32loop | till done
|
||||
clrw %d0
|
||||
subql #1,%d0
|
||||
jcc Lbz32loop
|
||||
|
||||
Lbzlong:
|
||||
/* set by longwords */
|
||||
movel d1,d0
|
||||
lsrl #2,d0 | cnt = len / 4
|
||||
movel %d1,%d0
|
||||
lsrl #2,%d0 | cnt = len / 4
|
||||
jeq Lbzbyte | if (cnt)
|
||||
subql #1,d0 | set up for dbf
|
||||
subql #1,%d0 | set up for dbf
|
||||
Lbzlloop:
|
||||
movl d2,a0@+ | clear longwords
|
||||
dbf d0,Lbzlloop | till done
|
||||
andl #3,d1 | len %= 4
|
||||
movl %d2,%a0@+ | clear longwords
|
||||
dbf %d0,Lbzlloop | till done
|
||||
andl #3,%d1 | len %= 4
|
||||
jeq Lbzdone
|
||||
|
||||
subql #1,d1 | set up for dbf
|
||||
subql #1,%d1 | set up for dbf
|
||||
Lbzbloop:
|
||||
movb d2,a0@+ | set bytes
|
||||
movb %d2,%a0@+ | set bytes
|
||||
Lbzbyte:
|
||||
dbf d1,Lbzbloop | till done
|
||||
dbf %d1,Lbzbloop | till done
|
||||
Lbzdone:
|
||||
movl sp@(8),d0 | return destination
|
||||
movl %sp@(8),%d0 | return destination
|
||||
#ifdef __SVR4_ABI__
|
||||
moveal d0,a0
|
||||
moveal %d0,%a0
|
||||
#endif
|
||||
movl sp@+,d2
|
||||
movl %sp@+,%d2
|
||||
rts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: rindex.S,v 1.8 1999/05/02 20:34:04 kleink Exp $ */
|
||||
/* $NetBSD: rindex.S,v 1.9 1999/10/25 23:48:15 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -43,7 +43,7 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)rindex.s 5.1 (Berkeley) 5/12/90")
|
||||
#else
|
||||
RCSID("$NetBSD: rindex.S,v 1.8 1999/05/02 20:34:04 kleink Exp $")
|
||||
RCSID("$NetBSD: rindex.S,v 1.9 1999/10/25 23:48:15 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
|
@ -52,15 +52,15 @@ ENTRY(strrchr)
|
|||
#else
|
||||
ENTRY(rindex)
|
||||
#endif
|
||||
movl sp@(4),a1 | string
|
||||
movb sp@(11),d0 | char to look for
|
||||
subl a0,a0 | clear rindex pointer
|
||||
movl %sp@(4),%a1 | string
|
||||
movb %sp@(11),%d0 | char to look for
|
||||
subl %a0,%a0 | clear rindex pointer
|
||||
rixloop:
|
||||
cmpb a1@,d0 | found our char?
|
||||
cmpb %a1@,%d0 | found our char?
|
||||
jne rixnope | no, check for null
|
||||
movl a1,a0 | yes, remember location
|
||||
movl %a1,%a0 | yes, remember location
|
||||
rixnope:
|
||||
tstb a1@+ | null?
|
||||
tstb %a1@+ | null?
|
||||
jne rixloop | no, keep going
|
||||
movl a0,d0 | return value
|
||||
movl %a0,%d0 | return value
|
||||
rts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: strcat.S,v 1.8 1999/05/02 20:34:04 kleink Exp $ */
|
||||
/* $NetBSD: strcat.S,v 1.9 1999/10/25 23:48:15 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -43,22 +43,22 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)strcpy.s 5.1 (Berkeley) 5/12/90")
|
||||
#else
|
||||
RCSID("$NetBSD: strcat.S,v 1.8 1999/05/02 20:34:04 kleink Exp $")
|
||||
RCSID("$NetBSD: strcat.S,v 1.9 1999/10/25 23:48:15 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
ENTRY(strcat)
|
||||
movl sp@(8),a0 | a0 = fromaddr
|
||||
movl sp@(4),d0 | return value is toaddr
|
||||
movl d0,a1 | a1 = toaddr
|
||||
movl %sp@(8),%a0 | a0 = fromaddr
|
||||
movl %sp@(4),%d0 | return value is toaddr
|
||||
movl %d0,%a1 | a1 = toaddr
|
||||
Lslloop:
|
||||
tstb a1@+ | null?
|
||||
tstb %a1@+ | null?
|
||||
jne Lslloop | no, keep going
|
||||
subql #1,a1
|
||||
subql #1,%a1
|
||||
Lscloop:
|
||||
movb a0@+,a1@+ | copy a byte
|
||||
movb %a0@+,%a1@+ | copy a byte
|
||||
jne Lscloop | copied non-null, keep going
|
||||
#ifdef __SVR4_ABI__
|
||||
moveal d0,a0
|
||||
moveal %d0,%a0
|
||||
#endif
|
||||
rts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: strcmp.S,v 1.12 1997/07/24 19:10:38 jtc Exp $ */
|
||||
/* $NetBSD: strcmp.S,v 1.13 1999/10/25 23:48:15 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997 The NetBSD Foundation, Inc.
|
||||
|
@ -40,40 +40,40 @@
|
|||
#include <machine/asm.h>
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
RCSID("$NetBSD: strcmp.S,v 1.12 1997/07/24 19:10:38 jtc Exp $")
|
||||
RCSID("$NetBSD: strcmp.S,v 1.13 1999/10/25 23:48:15 thorpej Exp $")
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
ENTRY(strcmp)
|
||||
movl sp@(4),a0
|
||||
movl sp@(8),a1
|
||||
movl %sp@(4),%a0
|
||||
movl %sp@(8),%a1
|
||||
L1: /* unrolled by 4 for 680[23]0's */
|
||||
movb a0@+,d1
|
||||
movb %a0@+,%d1
|
||||
jeq L2
|
||||
subb a1@+,d1
|
||||
subb %a1@+,%d1
|
||||
jne L3
|
||||
|
||||
movb a0@+,d1
|
||||
movb %a0@+,%d1
|
||||
jeq L2
|
||||
subb a1@+,d1
|
||||
subb %a1@+,%d1
|
||||
jne L3
|
||||
|
||||
movb a0@+,d1
|
||||
movb %a0@+,%d1
|
||||
jeq L2
|
||||
subb a1@+,d1
|
||||
subb %a1@+,%d1
|
||||
jne L3
|
||||
|
||||
movb a0@+,d1
|
||||
movb %a0@+,%d1
|
||||
jeq L2
|
||||
subb a1@+,d1
|
||||
subb %a1@+,%d1
|
||||
jeq L1
|
||||
|
||||
scs d0
|
||||
extbl d0
|
||||
movb d1,d0
|
||||
scs %d0
|
||||
extbl %d0
|
||||
movb %d1,%d0
|
||||
rts
|
||||
|
||||
L2: subb a1@,d1
|
||||
L3: scs d0
|
||||
extbl d0
|
||||
movb d1,d0
|
||||
L2: subb %a1@,%d1
|
||||
L3: scs %d0
|
||||
extbl %d0
|
||||
movb %d1,%d0
|
||||
rts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: strcpy.S,v 1.8 1999/05/02 20:34:04 kleink Exp $ */
|
||||
/* $NetBSD: strcpy.S,v 1.9 1999/10/25 23:48:15 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -43,18 +43,18 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)strcpy.s 5.1 (Berkeley) 5/12/90")
|
||||
#else
|
||||
RCSID("$NetBSD: strcpy.S,v 1.8 1999/05/02 20:34:04 kleink Exp $")
|
||||
RCSID("$NetBSD: strcpy.S,v 1.9 1999/10/25 23:48:15 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
ENTRY(strcpy)
|
||||
movl sp@(8),a0 | a0 = fromaddr
|
||||
movl sp@(4),d0 | return value is toaddr
|
||||
movl d0,a1 | a1 = toaddr
|
||||
movl %sp@(8),%a0 | a0 = fromaddr
|
||||
movl %sp@(4),%d0 | return value is toaddr
|
||||
movl %d0,%a1 | a1 = toaddr
|
||||
Lscloop:
|
||||
movb a0@+,a1@+ | copy a byte
|
||||
movb %a0@+,%a1@+ | copy a byte
|
||||
jne Lscloop | copied non-null, keep going
|
||||
#ifdef __SVR4_ABI__
|
||||
moveal d0,a0
|
||||
moveal %d0,%a0
|
||||
#endif
|
||||
rts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: strlen.S,v 1.8 1997/01/04 03:26:27 jtc Exp $ */
|
||||
/* $NetBSD: strlen.S,v 1.9 1999/10/25 23:48:16 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -43,16 +43,16 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)strlen.s 5.1 (Berkeley) 5/12/90")
|
||||
#else
|
||||
RCSID("$NetBSD: strlen.S,v 1.8 1997/01/04 03:26:27 jtc Exp $")
|
||||
RCSID("$NetBSD: strlen.S,v 1.9 1999/10/25 23:48:16 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
ENTRY(strlen)
|
||||
movl sp@(4),a0 | string
|
||||
movl a0,d0
|
||||
notl d0
|
||||
movl %sp@(4),%a0 | string
|
||||
movl %a0,%d0
|
||||
notl %d0
|
||||
Lslloop:
|
||||
tstb a0@+ | null?
|
||||
tstb %a0@+ | null?
|
||||
jne Lslloop | no, keep going
|
||||
addl a0,d0
|
||||
addl %a0,%d0
|
||||
rts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: strncmp.S,v 1.11 1997/07/24 19:10:41 jtc Exp $ */
|
||||
/* $NetBSD: strncmp.S,v 1.12 1999/10/25 23:48:16 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997 The NetBSD Foundation, Inc.
|
||||
|
@ -40,46 +40,46 @@
|
|||
#include <machine/asm.h>
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
RCSID("$NetBSD: strncmp.S,v 1.11 1997/07/24 19:10:41 jtc Exp $")
|
||||
RCSID("$NetBSD: strncmp.S,v 1.12 1999/10/25 23:48:16 thorpej Exp $")
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
ENTRY(strncmp)
|
||||
movl sp@(12),d0
|
||||
movl %sp@(12),%d0
|
||||
jeq L4
|
||||
movl sp@(4),a0
|
||||
movl sp@(8),a1
|
||||
movl %sp@(4),%a0
|
||||
movl %sp@(8),%a1
|
||||
L1: /* unroll by 4 for m680[23]0's */
|
||||
movb a0@+,d1
|
||||
movb %a0@+,%d1
|
||||
jeq L2
|
||||
subb a1@+,d1
|
||||
subb %a1@+,%d1
|
||||
jne L3
|
||||
subql #1,d0
|
||||
subql #1,%d0
|
||||
jeq L4
|
||||
|
||||
movb a0@+,d1
|
||||
movb %a0@+,%d1
|
||||
jeq L2
|
||||
subb a1@+,d1
|
||||
subb %a1@+,%d1
|
||||
jne L3
|
||||
subql #1,d0
|
||||
subql #1,%d0
|
||||
jeq L4
|
||||
|
||||
movb a0@+,d1
|
||||
movb %a0@+,%d1
|
||||
jeq L2
|
||||
subb a1@+,d1
|
||||
subb %a1@+,%d1
|
||||
jne L3
|
||||
subql #1,d0
|
||||
subql #1,%d0
|
||||
jeq L4
|
||||
|
||||
movb a0@+,d1
|
||||
movb %a0@+,%d1
|
||||
jeq L2
|
||||
subb a1@+,d1
|
||||
subb %a1@+,%d1
|
||||
jne L3
|
||||
subql #1,d0
|
||||
subql #1,%d0
|
||||
jne L1
|
||||
L4: rts
|
||||
|
||||
L2: subb a1@,d1
|
||||
L3: scs d0
|
||||
extbl d0
|
||||
movb d1,d0
|
||||
L2: subb %a1@,%d1
|
||||
L3: scs %d0
|
||||
extbl %d0
|
||||
movb %d1,%d0
|
||||
rts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: strncpy.S,v 1.9 1999/05/02 20:34:04 kleink Exp $ */
|
||||
/* $NetBSD: strncpy.S,v 1.10 1999/10/25 23:48:16 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -43,28 +43,28 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)strncpy.s 5.1 (Berkeley) 5/12/90")
|
||||
#else
|
||||
RCSID("$NetBSD: strncpy.S,v 1.9 1999/05/02 20:34:04 kleink Exp $")
|
||||
RCSID("$NetBSD: strncpy.S,v 1.10 1999/10/25 23:48:16 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
ENTRY(strncpy)
|
||||
movl sp@(4),d0 | return value is toaddr
|
||||
movl sp@(12),d1 | count
|
||||
movl %sp@(4),%d0 | return value is toaddr
|
||||
movl %sp@(12),%d1 | count
|
||||
jeq Lscdone | nothing to do
|
||||
movl sp@(8),a0 | a0 = fromaddr
|
||||
movl d0,a1 | a1 = toaddr
|
||||
movl %sp@(8),%a0 | a0 = fromaddr
|
||||
movl %d0,%a1 | a1 = toaddr
|
||||
Lscloop:
|
||||
movb a0@+,a1@+ | copy a byte
|
||||
movb %a0@+,%a1@+ | copy a byte
|
||||
jeq Lscploop | copied null, go pad if necessary
|
||||
subql #1,d1 | adjust count
|
||||
subql #1,%d1 | adjust count
|
||||
jne Lscloop | more room, keep going
|
||||
Lscdone:
|
||||
#ifdef __SVR4_ABI__
|
||||
moveal d0,a0
|
||||
moveal %d0,%a0
|
||||
#endif
|
||||
rts
|
||||
Lscploop:
|
||||
subql #1,d1 | adjust count
|
||||
subql #1,%d1 | adjust count
|
||||
jeq Lscdone | no more room, all done
|
||||
clrb a1@+ | clear a byte
|
||||
clrb %a1@+ | clear a byte
|
||||
jra Lscploop | keep going
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
/* $NetBSD: swab.S,v 1.6 1997/01/04 03:26:29 jtc Exp $ */
|
||||
/* $NetBSD: swab.S,v 1.7 1999/10/25 23:48:16 thorpej Exp $ */
|
||||
|
||||
#include <machine/asm.h>
|
||||
|
||||
ENTRY(swab)
|
||||
movl sp@(4),a0 | source
|
||||
movl sp@(8),a1 | destination
|
||||
movl sp@(12),d0 | count
|
||||
lsrl #1,d0 | count is in bytes; we need words
|
||||
movl %sp@(4),%a0 | source
|
||||
movl %sp@(8),%a1 | destination
|
||||
movl %sp@(12),%d0 | count
|
||||
lsrl #1,%d0 | count is in bytes; we need words
|
||||
jeq swdone
|
||||
|
||||
swloop:
|
||||
movw a0@+,d1
|
||||
rorw #8,d1
|
||||
movw d1,a1@+
|
||||
subql #1,d0
|
||||
movw %a0@+,%d1
|
||||
rorw #8,%d1
|
||||
movw %d1,%a1@+
|
||||
subql #1,%d0
|
||||
jne swloop
|
||||
|
||||
swdone:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: Ovfork.S,v 1.10 1999/10/18 03:24:30 itohy Exp $ */
|
||||
/* $NetBSD: Ovfork.S,v 1.11 1999/10/25 23:48:16 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -43,7 +43,7 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)Ovfork.s 5.1 (Berkeley) 5/12/90")
|
||||
#else
|
||||
RCSID("$NetBSD: Ovfork.S,v 1.10 1999/10/18 03:24:30 itohy Exp $")
|
||||
RCSID("$NetBSD: Ovfork.S,v 1.11 1999/10/25 23:48:16 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
|
@ -67,48 +67,48 @@ WARN_REFERENCES(vfork, \
|
|||
*/
|
||||
|
||||
ENTRY(vfork)
|
||||
movl sp@+,a0
|
||||
movl #SYS_vfork,d0
|
||||
movl %sp@+,%a0
|
||||
movl #SYS_vfork,%d0
|
||||
trap #0
|
||||
jcs err
|
||||
subql #1,d1 /* from 1 to 0 in child, 0 to -1 in parent */
|
||||
andl d1,d0
|
||||
jmp a0@
|
||||
subql #1,%d1 /* from 1 to 0 in child, 0 to -1 in parent */
|
||||
andl %d1,%d0
|
||||
jmp %a0@
|
||||
err:
|
||||
#ifdef _REENTRANT
|
||||
.globl _C_LABEL(__errno)
|
||||
movl a0,sp@-
|
||||
movl d0,sp@-
|
||||
movl %a0,%sp@-
|
||||
movl %d0,%sp@-
|
||||
#if defined(PIC) && !defined(__ELF__)
|
||||
movl #_C_LABEL(_GLOBAL_OFFSET_TABLE_),a1
|
||||
lea pc@(0,a1:l),a1
|
||||
movl a1@(_C_LABEL(__errno):l),a1
|
||||
jsr a1@
|
||||
movl #_C_LABEL(_GLOBAL_OFFSET_TABLE_),%a1
|
||||
lea %pc@(0,a1:l),%a1
|
||||
movl %a1@(_C_LABEL(__errno):l),%a1
|
||||
jsr %a1@
|
||||
#else
|
||||
jbsr PIC_PLT(_C_LABEL(__errno))
|
||||
#endif /* PIC */
|
||||
#ifdef __SVR4_ABI__
|
||||
movl sp@+,a0@
|
||||
movl %sp@+,%a0@
|
||||
#else
|
||||
movl d0,a1
|
||||
movl sp@+,a1@
|
||||
movl %d0,%a1
|
||||
movl %sp@+,%a1@
|
||||
#endif /* __SVR4_ABI__ */
|
||||
movl sp@+,a0
|
||||
movl %sp@+,%a0
|
||||
#else
|
||||
.globl _C_LABEL(errno)
|
||||
#ifdef PIC
|
||||
#ifdef __ELF__
|
||||
lea pc@(_GLOBAL_OFFSET_TABLE_@GOTPC),a1
|
||||
movl a1@(_C_LABEL(errno)@GOT:w),a1
|
||||
lea %pc@(_GLOBAL_OFFSET_TABLE_@GOTPC),%a1
|
||||
movl %a1@(_C_LABEL(errno)@GOT:w),%a1
|
||||
#else
|
||||
movl #_C_LABEL(_GLOBAL_OFFSET_TABLE_),a1
|
||||
lea pc@(0,a1:l),a1
|
||||
movl a1@(_C_LABEL(errno):w),a1
|
||||
movl #_C_LABEL(_GLOBAL_OFFSET_TABLE_),%a1
|
||||
lea %pc@(0,a1:l),%a1
|
||||
movl %a1@(_C_LABEL(errno):w),%a1
|
||||
#endif
|
||||
movl d0,a1@
|
||||
movl %d0,%a1@
|
||||
#else
|
||||
movl d0,_C_LABEL(errno)
|
||||
movl %d0,_C_LABEL(errno)
|
||||
#endif /* PIC */
|
||||
#endif /* _REENTRANT */
|
||||
moveq #-1,d0
|
||||
jmp a0@
|
||||
moveq #-1,%d0
|
||||
jmp %a0@
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: __sigreturn14.S,v 1.3 1999/05/02 23:19:50 kleink Exp $ */
|
||||
/* $NetBSD: __sigreturn14.S,v 1.4 1999/10/25 23:48:16 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -43,7 +43,7 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)sigreturn.s 5.1 (Berkeley) 5/12/90")
|
||||
#else
|
||||
RCSID("$NetBSD: __sigreturn14.S,v 1.3 1999/05/02 23:19:50 kleink Exp $")
|
||||
RCSID("$NetBSD: __sigreturn14.S,v 1.4 1999/10/25 23:48:16 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
|
@ -53,9 +53,9 @@
|
|||
#ifdef GPROF
|
||||
#undef ENTRY
|
||||
#define ENTRY(x) \
|
||||
.globl _/**/x; .even; _/**/x:; moveml #0xC0C0,sp@-; .data; \
|
||||
PROF/**/x:; .long 0; .text; lea PROF/**/x,a0; jbsr mcount; \
|
||||
moveml sp@+,#0x0303
|
||||
.globl _/**/x; .even; _/**/x:; moveml #0xC0C0,%sp@-; .data; \
|
||||
PROF/**/x:; .long 0; .text; lea PROF/**/x,%a0; jbsr mcount; \
|
||||
moveml %sp@+,#0x0303
|
||||
#endif /* GPROF */
|
||||
|
||||
ENTRY(__sigreturn14)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: __vfork14.S,v 1.5 1999/10/18 03:24:30 itohy Exp $ */
|
||||
/* $NetBSD: __vfork14.S,v 1.6 1999/10/25 23:48:17 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -43,7 +43,7 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)Ovfork.s 5.1 (Berkeley) 5/12/90")
|
||||
#else
|
||||
RCSID("$NetBSD: __vfork14.S,v 1.5 1999/10/18 03:24:30 itohy Exp $")
|
||||
RCSID("$NetBSD: __vfork14.S,v 1.6 1999/10/25 23:48:17 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
|
@ -64,48 +64,48 @@
|
|||
*/
|
||||
|
||||
ENTRY(__vfork14)
|
||||
movl sp@+,a0
|
||||
movl #SYS___vfork14,d0
|
||||
movl %sp@+,%a0
|
||||
movl #SYS___vfork14,%d0
|
||||
trap #0
|
||||
jcs err
|
||||
subql #1,d1 /* from 1 to 0 in child, 0 to -1 in parent */
|
||||
andl d1,d0
|
||||
jmp a0@
|
||||
subql #1,%d1 /* from 1 to 0 in child, 0 to -1 in parent */
|
||||
andl %d1,%d0
|
||||
jmp %a0@
|
||||
err:
|
||||
#ifdef _REENTRANT
|
||||
.globl _C_LABEL(__errno)
|
||||
movl a0,sp@-
|
||||
movl d0,sp@-
|
||||
movl %a0,%sp@-
|
||||
movl %d0,%sp@-
|
||||
#if defined(PIC) && !defined(__ELF__)
|
||||
movl #_C_LABEL(_GLOBAL_OFFSET_TABLE_),a1
|
||||
lea pc@(0,a1:l),a1
|
||||
movl a1@(_C_LABEL(__errno):l),a1
|
||||
jsr a1@
|
||||
movl #_C_LABEL(_GLOBAL_OFFSET_TABLE_),%a1
|
||||
lea %pc@(0,a1:l),%a1
|
||||
movl %a1@(_C_LABEL(__errno):l),%a1
|
||||
jsr %a1@
|
||||
#else
|
||||
jbsr PIC_PLT(_C_LABEL(__errno))
|
||||
#endif /* PIC */
|
||||
#ifdef __SVR4_ABI__
|
||||
movl sp@+,a0@
|
||||
movl %sp@+,%a0@
|
||||
#else
|
||||
movl d0,a1
|
||||
movl sp@+,a1@
|
||||
movl %d0,%a1
|
||||
movl %sp@+,%a1@
|
||||
#endif
|
||||
movl sp@+,a0
|
||||
movl %sp@+,%a0
|
||||
#else
|
||||
.globl _C_LABEL(errno)
|
||||
#ifdef PIC
|
||||
#ifdef __ELF__
|
||||
lea pc@(_GLOBAL_OFFSET_TABLE_@GOTPC),a1
|
||||
movl a1@(_C_LABEL(errno)@GOT:w),a1
|
||||
lea %pc@(_GLOBAL_OFFSET_TABLE_@GOTPC),%a1
|
||||
movl %a1@(_C_LABEL(errno)@GOT:w),%a1
|
||||
#else
|
||||
movl #_C_LABEL(_GLOBAL_OFFSET_TABLE_),a1
|
||||
lea pc@(0,a1:l),a1
|
||||
movl a1@(_C_LABEL(errno):w),a1
|
||||
movl #_C_LABEL(_GLOBAL_OFFSET_TABLE_),%a1
|
||||
lea %pc@(0,a1:l),%a1
|
||||
movl %a1@(_C_LABEL(errno):w),%a1
|
||||
#endif
|
||||
movl d0,a1@
|
||||
movl %d0,%a1@
|
||||
#else
|
||||
movl d0,_C_LABEL(errno)
|
||||
movl %d0,_C_LABEL(errno)
|
||||
#endif /* PIC */
|
||||
#endif /* _REENTRANT */
|
||||
moveq #-1,d0
|
||||
jmp a0@
|
||||
moveq #-1,%d0
|
||||
jmp %a0@
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: brk.S,v 1.9 1999/10/18 03:24:30 itohy Exp $ */
|
||||
/* $NetBSD: brk.S,v 1.10 1999/10/25 23:48:17 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -43,7 +43,7 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)brk.s 5.1 (Berkeley) 5/12/90")
|
||||
#else
|
||||
RCSID("$NetBSD: brk.S,v 1.9 1999/10/18 03:24:30 itohy Exp $")
|
||||
RCSID("$NetBSD: brk.S,v 1.10 1999/10/25 23:48:17 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
|
@ -59,35 +59,35 @@ _C_LABEL(__minbrk):
|
|||
ENTRY(brk)
|
||||
#ifdef PIC
|
||||
#ifdef __ELF__
|
||||
lea pc@(_GLOBAL_OFFSET_TABLE_@GOTPC),a1
|
||||
movl a1@(_C_LABEL(__minbrk)@GOT:w),a0
|
||||
lea %pc@(_GLOBAL_OFFSET_TABLE_@GOTPC),%a1
|
||||
movl %a1@(_C_LABEL(__minbrk)@GOT:w),%a0
|
||||
#else
|
||||
movl #_C_LABEL(_GLOBAL_OFFSET_TABLE_),a1
|
||||
lea pc@(0,a1:l),a1
|
||||
movl a1@(_C_LABEL(__minbrk):w),a0
|
||||
movl #_C_LABEL(_GLOBAL_OFFSET_TABLE_),%a1
|
||||
lea %pc@(0,a1:l),%a1
|
||||
movl %a1@(_C_LABEL(__minbrk):w),%a0
|
||||
#endif
|
||||
movl a0@,d0
|
||||
movl %a0@,%d0
|
||||
#else
|
||||
movl _C_LABEL(__minbrk),d0
|
||||
movl _C_LABEL(__minbrk),%d0
|
||||
#endif
|
||||
cmpl sp@(4),d0
|
||||
cmpl %sp@(4),%d0
|
||||
jle ok
|
||||
movl d0,sp@(4)
|
||||
movl %d0,%sp@(4)
|
||||
ok:
|
||||
movl #SYS_break,d0
|
||||
movl #SYS_break,%d0
|
||||
trap #0
|
||||
jcs err
|
||||
#ifdef PIC
|
||||
#ifdef __ELF__
|
||||
movl a1@(CURBRK@GOT:w),a0
|
||||
movl %a1@(CURBRK@GOT:w),%a0
|
||||
#else
|
||||
movl a1@(CURBRK:w),a0
|
||||
movl %a1@(CURBRK:w),%a0
|
||||
#endif
|
||||
movl sp@(4),a0@
|
||||
movl %sp@(4),%a0@
|
||||
#else
|
||||
movl sp@(4),CURBRK
|
||||
movl %sp@(4),CURBRK
|
||||
#endif
|
||||
clrl d0
|
||||
clrl %d0
|
||||
rts
|
||||
err:
|
||||
jra PIC_PLT(CERROR)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: cerror.S,v 1.12 1999/10/18 03:24:30 itohy Exp $ */
|
||||
/* $NetBSD: cerror.S,v 1.13 1999/10/25 23:48:17 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -43,7 +43,7 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)cerror.s 5.1 (Berkeley) 5/12/90")
|
||||
#else
|
||||
RCSID("$NetBSD: cerror.S,v 1.12 1999/10/18 03:24:30 itohy Exp $")
|
||||
RCSID("$NetBSD: cerror.S,v 1.13 1999/10/25 23:48:17 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
|
@ -54,34 +54,34 @@
|
|||
#endif
|
||||
_ENTRY(CERROR)
|
||||
#ifdef _REENTRANT
|
||||
movl d0,sp@-
|
||||
movl %d0,%sp@-
|
||||
#if defined(PIC) && !defined(__ELF__)
|
||||
movl #_C_LABEL(_GLOBAL_OFFSET_TABLE_),a0
|
||||
lea pc@(0,a0:l),a0
|
||||
movl a0@(_C_LABEL(__errno):l),a0
|
||||
jsr a0@
|
||||
movl #_C_LABEL(_GLOBAL_OFFSET_TABLE_),%a0
|
||||
lea %pc@(0,%a0:l),%a0
|
||||
movl %a0@(_C_LABEL(__errno):l),%a0
|
||||
jsr %a0@
|
||||
#else
|
||||
jbsr PIC_PLT(_C_LABEL(__errno))
|
||||
#endif
|
||||
#ifndef __SVR4_ABI__
|
||||
movl d0,a0
|
||||
movl %d0,%a0
|
||||
#endif
|
||||
movl sp@+,a0@
|
||||
movl %sp@+,%a0@
|
||||
#else
|
||||
#ifdef PIC
|
||||
#ifdef __ELF__
|
||||
lea pc@(_GLOBAL_OFFSET_TABLE_@GOTPC),a0
|
||||
movl a0@(_C_LABEL(errno)@GOT:w),a0
|
||||
lea %pc@(_GLOBAL_OFFSET_TABLE_@GOTPC),%a0
|
||||
movl %a0@(_C_LABEL(errno)@GOT:w),%a0
|
||||
#else
|
||||
movl #_C_LABEL(_GLOBAL_OFFSET_TABLE_),a0
|
||||
lea pc@(0,a0:l),a0
|
||||
movl a0@(_C_LABEL(errno):w),a0
|
||||
movl #_C_LABEL(_GLOBAL_OFFSET_TABLE_),%a0
|
||||
lea %pc@(0,a0:l),%a0
|
||||
movl %a0@(_C_LABEL(errno):w),%a0
|
||||
#endif
|
||||
movl d0,a0@
|
||||
movl %d0,%a0@
|
||||
#else
|
||||
movl d0,_C_LABEL(errno)
|
||||
movl %d0,_C_LABEL(errno)
|
||||
#endif
|
||||
#endif /* _REENTRANT */
|
||||
movl #-1,d0
|
||||
movl #-1,d1
|
||||
movl #-1,%d0
|
||||
movl #-1,%d1
|
||||
rts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: exect.S,v 1.5 1999/05/02 23:19:50 kleink Exp $ */
|
||||
/* $NetBSD: exect.S,v 1.6 1999/10/25 23:48:17 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -44,11 +44,11 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)exect.s 5.1 (Berkeley) 5/12/90")
|
||||
#else
|
||||
RCSID("$NetBSD: exect.S,v 1.5 1999/05/02 23:19:50 kleink Exp $")
|
||||
RCSID("$NetBSD: exect.S,v 1.6 1999/10/25 23:48:17 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
ENTRY(exect)
|
||||
movl #SYS_execve,d0
|
||||
movl #SYS_execve,%d0
|
||||
trap #0
|
||||
jra PIC_PLT(CERROR) /* exect(file, argv, env) */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: fork.S,v 1.3 1995/12/13 22:17:57 thorpej Exp $ */
|
||||
/* $NetBSD: fork.S,v 1.4 1999/10/25 23:48:17 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -43,11 +43,11 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)fork.s 5.1 (Berkeley) 5/12/90")
|
||||
#else
|
||||
RCSID("$NetBSD: fork.S,v 1.3 1995/12/13 22:17:57 thorpej Exp $")
|
||||
RCSID("$NetBSD: fork.S,v 1.4 1999/10/25 23:48:17 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
SYSCALL(fork)
|
||||
subql #1,d1 /* from 1 to 0 in child, 0 to -1 in parent */
|
||||
andl d1,d0
|
||||
subql #1,%d1 /* from 1 to 0 in child, 0 to -1 in parent */
|
||||
andl %d1,%d0
|
||||
rts /* pid = fork() */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pipe.S,v 1.2 1995/12/13 22:17:59 thorpej Exp $ */
|
||||
/* $NetBSD: pipe.S,v 1.3 1999/10/25 23:48:17 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -43,13 +43,13 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)pipe.s 5.1 (Berkeley) 5/12/90")
|
||||
#else
|
||||
RCSID("$NetBSD: pipe.S,v 1.2 1995/12/13 22:17:59 thorpej Exp $")
|
||||
RCSID("$NetBSD: pipe.S,v 1.3 1999/10/25 23:48:17 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
SYSCALL(pipe)
|
||||
movl sp@(4),a0
|
||||
movl d0,a0@+
|
||||
movl d1,a0@
|
||||
clrl d0
|
||||
movl %sp@(4),%a0
|
||||
movl %d0,%a0@+
|
||||
movl %d1,%a0@
|
||||
clrl %d0
|
||||
rts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ptrace.S,v 1.9 1999/10/18 03:24:30 itohy Exp $ */
|
||||
/* $NetBSD: ptrace.S,v 1.10 1999/10/25 23:48:17 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -43,7 +43,7 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)ptrace.s 5.1 (Berkeley) 5/12/90")
|
||||
#else
|
||||
RCSID("$NetBSD: ptrace.S,v 1.9 1999/10/18 03:24:30 itohy Exp $")
|
||||
RCSID("$NetBSD: ptrace.S,v 1.10 1999/10/25 23:48:17 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
|
@ -56,33 +56,33 @@
|
|||
ENTRY(ptrace)
|
||||
#ifdef _REENTRANT
|
||||
#if defined(PIC) && !defined(__ELF__)
|
||||
movl #_C_LABEL(_GLOBAL_OFFSET_TABLE_),a0
|
||||
lea pc@(0,a0:l),a0
|
||||
movl a0@(_C_LABEL(__errno):l),a0
|
||||
jsr a0@
|
||||
movl #_C_LABEL(_GLOBAL_OFFSET_TABLE_),%a0
|
||||
lea %pc@(0,%a0:l),%a0
|
||||
movl %a0@(_C_LABEL(__errno):l),%a0
|
||||
jsr %a0@
|
||||
#else
|
||||
jbsr PIC_PLT(_C_LABEL(__errno))
|
||||
#endif /* PIC */
|
||||
#ifndef __SVR4_ABI__
|
||||
movl d0,a0
|
||||
movl %d0,%a0
|
||||
#endif
|
||||
clrl a0@
|
||||
clrl %a0@
|
||||
#else
|
||||
#ifdef PIC
|
||||
#ifdef __ELF__
|
||||
lea pc@(_GLOBAL_OFFSET_TABLE_@GOTPC),a0
|
||||
movl a0@(_C_LABEL(errno)@GOT:w),a0
|
||||
lea %pc@(_GLOBAL_OFFSET_TABLE_@GOTPC),%a0
|
||||
movl %a0@(_C_LABEL(errno)@GOT:w),%a0
|
||||
#else
|
||||
movl #_C_LABEL(_GLOBAL_OFFSET_TABLE_),a0
|
||||
lea pc@(0,a0:l),a0
|
||||
movl a0@(_C_LABEL(errno):w),a0
|
||||
movl #_C_LABEL(_GLOBAL_OFFSET_TABLE_),%a0
|
||||
lea %pc@(0,%a0:l),%a0
|
||||
movl %a0@(_C_LABEL(errno):w),%a0
|
||||
#endif
|
||||
clrl a0@
|
||||
clrl %a0@
|
||||
#else
|
||||
clrl _C_LABEL(errno)
|
||||
#endif /* PIC */
|
||||
#endif /* _REENTRANT */
|
||||
movl #SYS_ptrace,d0
|
||||
movl #SYS_ptrace,%d0
|
||||
trap #0
|
||||
jcs err
|
||||
rts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: sbrk.S,v 1.9 1999/10/18 03:24:30 itohy Exp $ */
|
||||
/* $NetBSD: sbrk.S,v 1.10 1999/10/25 23:48:17 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -43,7 +43,7 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)sbrk.s 5.1 (Berkeley) 5/12/90")
|
||||
#else
|
||||
RCSID("$NetBSD: sbrk.S,v 1.9 1999/10/18 03:24:30 itohy Exp $")
|
||||
RCSID("$NetBSD: sbrk.S,v 1.10 1999/10/25 23:48:17 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
|
@ -57,30 +57,30 @@ CURBRK: .long _C_LABEL(end)
|
|||
ENTRY(sbrk)
|
||||
#ifdef PIC
|
||||
#ifdef __ELF__
|
||||
lea pc@(_GLOBAL_OFFSET_TABLE_@GOTPC),a1
|
||||
movl a1@(CURBRK@GOT:w),a1
|
||||
lea %pc@(_GLOBAL_OFFSET_TABLE_@GOTPC),%a1
|
||||
movl %a1@(CURBRK@GOT:w),%a1
|
||||
#else
|
||||
movl #_C_LABEL(_GLOBAL_OFFSET_TABLE_),a1
|
||||
lea pc@(0,a1:l),a1
|
||||
movl a1@(CURBRK:w),a1
|
||||
movl #_C_LABEL(_GLOBAL_OFFSET_TABLE_),%a1
|
||||
lea %pc@(0,%a1:l),%a1
|
||||
movl %a1@(CURBRK:w),%a1
|
||||
#endif
|
||||
movl a1@,d0
|
||||
movl %a1@,%d0
|
||||
#else
|
||||
movl CURBRK,d0
|
||||
movl CURBRK,%d0
|
||||
#endif
|
||||
addl d0,sp@(4)
|
||||
movl #SYS_break,d0
|
||||
addl %d0,%sp@(4)
|
||||
movl #SYS_break,%d0
|
||||
trap #0
|
||||
jcs err
|
||||
#ifdef PIC
|
||||
movl a1@,d0
|
||||
movl sp@(4),a1@
|
||||
movl %a1@,%d0
|
||||
movl %sp@(4),%a1@
|
||||
#else
|
||||
movl CURBRK,d0
|
||||
movl sp@(4),CURBRK
|
||||
movl CURBRK,%d0
|
||||
movl %sp@(4),CURBRK
|
||||
#endif
|
||||
#ifdef __SVR4_ABI__
|
||||
movl d0,a0
|
||||
movl %d0,%a0
|
||||
#endif
|
||||
rts
|
||||
err:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: setlogin.S,v 1.6 1999/10/18 03:24:30 itohy Exp $ */
|
||||
/* $NetBSD: setlogin.S,v 1.7 1999/10/25 23:48:17 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1991 The Regents of the University of California.
|
||||
|
@ -39,7 +39,7 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)setlogin.s 5.1 (Berkeley) 5/6/91")
|
||||
#else
|
||||
RCSID("$NetBSD: setlogin.S,v 1.6 1999/10/18 03:24:30 itohy Exp $")
|
||||
RCSID("$NetBSD: setlogin.S,v 1.7 1999/10/25 23:48:17 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
|
@ -48,14 +48,14 @@
|
|||
SYSCALL(setlogin)
|
||||
#ifdef PIC
|
||||
#ifdef __ELF__
|
||||
lea pc@(_GLOBAL_OFFSET_TABLE_@GOTPC),a1
|
||||
movl a1@(_C_LABEL(__logname_valid)@GOT:w),a1
|
||||
lea %pc@(_GLOBAL_OFFSET_TABLE_@GOTPC),%a1
|
||||
movl %a1@(_C_LABEL(__logname_valid)@GOT:w),%a1
|
||||
#else
|
||||
movl #_C_LABEL(_GLOBAL_OFFSET_TABLE_),a1
|
||||
lea pc@(0,a1:l),a1
|
||||
movl a1@(_C_LABEL(__logname_valid):w),a1
|
||||
movl #_C_LABEL(_GLOBAL_OFFSET_TABLE_),%a1
|
||||
lea %pc@(0,%a1:l),%a1
|
||||
movl %a1@(_C_LABEL(__logname_valid):w),%a1
|
||||
#endif
|
||||
clrl a1@
|
||||
clrl %a1@
|
||||
#else
|
||||
clrl _C_LABEL(__logname_valid)
|
||||
#endif
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: sigpending.S,v 1.4 1998/12/02 01:01:04 thorpej Exp $ */
|
||||
/* $NetBSD: sigpending.S,v 1.5 1999/10/25 23:48:17 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -43,7 +43,7 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)sigpending.s 5.2 (Berkeley) 8/6/90")
|
||||
#else
|
||||
RCSID("$NetBSD: sigpending.S,v 1.4 1998/12/02 01:01:04 thorpej Exp $")
|
||||
RCSID("$NetBSD: sigpending.S,v 1.5 1999/10/25 23:48:17 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
|
@ -51,7 +51,7 @@ WARN_REFERENCES(sigpending, \
|
|||
"warning: reference to compatibility sigpending(); include <signal.h> for correct reference")
|
||||
|
||||
_SYSCALL(sigpending,compat_13_sigpending13)
|
||||
movl sp@(4),a0
|
||||
movl d0,a0@
|
||||
clrl d0
|
||||
movl %sp@(4),%a0
|
||||
movl %d0,%a0@
|
||||
clrl %d0
|
||||
rts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: sigprocmask.S,v 1.8 1999/05/02 23:19:50 kleink Exp $ */
|
||||
/* $NetBSD: sigprocmask.S,v 1.9 1999/10/25 23:48:18 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -43,7 +43,7 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)sigprocmask.s 5.2 (Berkeley) 6/6/90")
|
||||
#else
|
||||
RCSID("$NetBSD: sigprocmask.S,v 1.8 1999/05/02 23:19:50 kleink Exp $")
|
||||
RCSID("$NetBSD: sigprocmask.S,v 1.9 1999/10/25 23:48:18 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
|
@ -51,24 +51,24 @@ WARN_REFERENCES(sigprocmask, \
|
|||
"warning: reference to compatibility sigprocmask(); include <signal.h> for correct reference")
|
||||
|
||||
ENTRY(sigprocmask)
|
||||
tstl sp@(8) /* check new sigset pointer */
|
||||
tstl %sp@(8) /* check new sigset pointer */
|
||||
jne gotptr /* if not null, indirect */
|
||||
/* movl #0,sp@(8) /* null mask pointer: block empty set */
|
||||
movl #1,sp@(4) /* SIG_BLOCK */
|
||||
/* movl #0,%sp@(8) /* null mask pointer: block empty set */
|
||||
movl #1,%sp@(4) /* SIG_BLOCK */
|
||||
jra doit
|
||||
gotptr:
|
||||
movl sp@(8),a0
|
||||
movl a0@,sp@(8) /* indirect to new mask arg */
|
||||
movl %sp@(8),%a0
|
||||
movl %a0@,%sp@(8) /* indirect to new mask arg */
|
||||
doit:
|
||||
movl #SYS_compat_13_sigprocmask13,d0
|
||||
movl #SYS_compat_13_sigprocmask13,%d0
|
||||
trap #0
|
||||
jcs err
|
||||
tstl sp@(12) /* test if old mask requested */
|
||||
tstl %sp@(12) /* test if old mask requested */
|
||||
jeq out
|
||||
movl sp@(12),a0
|
||||
movl d0,a0@ /* store old mask */
|
||||
movl %sp@(12),%a0
|
||||
movl %d0,%a0@ /* store old mask */
|
||||
out:
|
||||
clrl d0
|
||||
clrl %d0
|
||||
rts
|
||||
err:
|
||||
jra PIC_PLT(CERROR)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: sigsuspend.S,v 1.8 1999/05/02 23:19:50 kleink Exp $ */
|
||||
/* $NetBSD: sigsuspend.S,v 1.9 1999/10/25 23:48:18 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -43,7 +43,7 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)sigsuspend.s 5.2 (Berkeley) 6/6/90")
|
||||
#else
|
||||
RCSID("$NetBSD: sigsuspend.S,v 1.8 1999/05/02 23:19:50 kleink Exp $")
|
||||
RCSID("$NetBSD: sigsuspend.S,v 1.9 1999/10/25 23:48:18 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
|
@ -51,12 +51,12 @@ WARN_REFERENCES(sigsuspend, \
|
|||
"warning: reference to compatibility sigsuspend(); include <signal.h> for correct reference")
|
||||
|
||||
ENTRY(sigsuspend)
|
||||
movl sp@(4),a0
|
||||
movl a0@,sp@(4) /* indirect to mask arg */
|
||||
movl #SYS_compat_13_sigsuspend13,d0
|
||||
movl %sp@(4),%a0
|
||||
movl %a0@,%sp@(4) /* indirect to mask arg */
|
||||
movl #SYS_compat_13_sigsuspend13,%d0
|
||||
trap #0
|
||||
jcs err
|
||||
clrl d0 /* shouldn't happen */
|
||||
clrl %d0 /* shouldn't happen */
|
||||
rts
|
||||
err:
|
||||
jra PIC_PLT(CERROR)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: syscall.S,v 1.5 1999/05/02 23:19:50 kleink Exp $ */
|
||||
/* $NetBSD: syscall.S,v 1.6 1999/10/25 23:48:18 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -43,12 +43,12 @@
|
|||
#if 0
|
||||
RCSID("from: @(#)syscall.s 5.1 (Berkeley) 5/12/90")
|
||||
#else
|
||||
RCSID("$NetBSD: syscall.S,v 1.5 1999/05/02 23:19:50 kleink Exp $")
|
||||
RCSID("$NetBSD: syscall.S,v 1.6 1999/10/25 23:48:18 thorpej Exp $")
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
ENTRY(syscall)
|
||||
clrl d0
|
||||
clrl %d0
|
||||
trap #0
|
||||
jcs err
|
||||
rts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: asm.h,v 1.18 1999/05/01 19:20:52 kleink Exp $ */
|
||||
/* $NetBSD: asm.h,v 1.19 1999/10/25 23:52:52 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997 The NetBSD Foundation, Inc.
|
||||
|
@ -106,7 +106,7 @@
|
|||
.text; .even; .globl name; .type name,@function; name:
|
||||
|
||||
#ifdef GPROF
|
||||
#define _PROF_PROLOG link a6,#0; jbsr mcount; unlk a6
|
||||
#define _PROF_PROLOG link %a6,#0; jbsr mcount; unlk %a6
|
||||
#else
|
||||
#define _PROF_PROLOG
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue