vtrace -> sys_vtrace

This commit is contained in:
chopps 1995-10-09 04:33:52 +00:00
parent dc683639f7
commit ad89dc6f0a
5 changed files with 10 additions and 140 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: locore.s,v 1.45 1995/09/29 13:51:35 chopps Exp $ */
/* $NetBSD: locore.s,v 1.46 1995/10/09 04:33:52 chopps Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -1706,70 +1706,6 @@ ENTRY(_remque)
movw d0,sr
rts
/*
* bzero(addr, count)
*/
ALTENTRY(blkclr, _bzero)
ENTRY(bzero)
movl sp@(4),a0 | address
movl sp@(8),d0 | count
jeq Lbzdone | if zero, nothing to do
movl a0,d1
btst #0,d1 | address odd?
jeq Lbzeven | no, can copy words
clrb a0@+ | yes, zero byte to get to even boundary
subql #1,d0 | decrement count
jeq Lbzdone | none left, all done
Lbzeven:
movl d0,d1
andl #31,d0
lsrl #5,d1 | convert count to 8*longword count
jeq Lbzbyte | no such blocks, zero byte at a time
Lbzloop:
clrl a0@+; clrl a0@+; clrl a0@+; clrl a0@+;
clrl a0@+; clrl a0@+; clrl a0@+; clrl a0@+;
subql #1,d1 | one more block zeroed
jne Lbzloop | more to go, do it
tstl d0 | partial block left?
jeq Lbzdone | no, all done
Lbzbyte:
clrb a0@+
subql #1,d0 | one more byte cleared
jne Lbzbyte | more to go, do it
Lbzdone:
rts
/*
* strlen(str)
*/
ENTRY(strlen)
moveq #-1,d0
movl sp@(4),a0 | string
Lslloop:
addql #1,d0 | increment count
tstb a0@+ | null?
jne Lslloop | no, keep going
rts
/*
* bcmp(s1, s2, len)
*
* WARNING! This guy only works with counts up to 64K
*/
ENTRY(bcmp)
movl sp@(4),a0 | string 1
movl sp@(8),a1 | string 2
moveq #0,d0
movw sp@(14),d0 | length
jeq Lcmpdone | if zero, nothing to do
subqw #1,d0 | set up for DBcc loop
Lcmploop:
cmpmb a0@+,a1@+ | equal?
dbne d0,Lcmploop | yes, keep going
addqw #1,d0 | +1 gives zero on match
Lcmpdone:
rts
ENTRY(memcpy)
movl sp@(12),d0 | get count
jeq Lcpyexit | if zero, return
@ -1845,72 +1781,6 @@ Lcbbloop:
dbf d0,Lcbbloop | til done
rts
/*
* Emulate fancy VAX string operations:
* scanc(count, startc, table, mask)
* skpc(mask, count, startc)
* locc(mask, count, startc)
*/
ENTRY(scanc)
movl sp@(4),d0 | get length
jeq Lscdone | nothing to do, return
movl sp@(8),a0 | start of scan
movl sp@(12),a1 | table to compare with
movb sp@(19),d1 | and mask to use
movw d2,sp@- | need a scratch register
clrw d2 | clear it out
subqw #1,d0 | adjust for dbra
Lscloop:
movb a0@+,d2 | get character
movb a1@(0,d2:w),d2 | get table entry
andb d1,d2 | mask it
dbne d0,Lscloop | keep going til no more or non-zero
addqw #1,d0 | overshot by one
movw sp@+,d2 | restore scratch
Lscdone:
rts
ENTRY(skpc)
movl sp@(8),d0 | get length
jeq Lskdone | nothing to do, return
movb sp@(7),d1 | mask to use
movl sp@(12),a0 | where to start
subqw #1,d0 | adjust for dbcc
Lskloop:
cmpb a0@+,d1 | compate with mask
dbne d0,Lskloop | keep going til no more or zero
addqw #1,d0 | overshot by one
Lskdone:
rts
ENTRY(locc)
movl sp@(8),d0 | get length
jeq Llcdone | nothing to do, return
movb sp@(7),d1 | mask to use
movl sp@(12),a0 | where to start
subqw #1,d0 | adjust for dbcc
Llcloop:
cmpb a0@+,d1 | compate with mask
dbeq d0,Llcloop | keep going til no more or non-zero
addqw #1,d0 | overshot by one
Llcdone:
rts
/*
* Emulate VAX FFS (find first set) instruction.
*/
ENTRY(ffs)
moveq #-1,d0
movl sp@(4),d1
jeq Lffsdone
Lffsloop:
addql #1,d0
btst d0,d1
jeq Lffsloop
Lffsdone:
addql #1,d0
rts
#ifdef FPCOPROC
/*
* Save and restore 68881 state.

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.58 1995/10/07 06:25:25 mycroft Exp $ */
/* $NetBSD: machdep.c,v 1.59 1995/10/09 04:33:58 chopps Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -832,7 +832,7 @@ bootsync(void)
*/
if (panicstr == 0)
vnode_pager_umount(NULL);
sync(&proc0, (void *)NULL, (int *)NULL);
sys_sync(&proc0, (void *)NULL, (int *)NULL);
/*
* unmount filesystems
*/

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.c,v 1.26 1995/09/29 13:51:41 chopps Exp $ */
/* $NetBSD: pmap.c,v 1.27 1995/10/09 04:34:02 chopps Exp $ */
/*
* Copyright (c) 1991 Regents of the University of California.
@ -415,7 +415,7 @@ pmap_bootstrap_alloc(size)
avail_start + size, VM_PROT_READ|VM_PROT_WRITE);
avail_start += size;
blkclr((caddr_t) val, size);
bzero((caddr_t) val, size);
return((void *) val);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: sys_machdep.c,v 1.11 1995/09/19 23:06:34 thorpej Exp $ */
/* $NetBSD: sys_machdep.c,v 1.12 1995/10/09 04:34:05 chopps Exp $ */
/*
* Copyright (c) 1982, 1986 Regents of the University of California.
@ -55,7 +55,7 @@
#ifdef TRACE
int nvualarm;
vtrace(p, v, retval)
sys_vtrace(p, v, retval)
struct proc *p;
void *v;
register_t *retval;
@ -271,7 +271,7 @@ dma_cachectl(addr, len)
}
int
sysarch(p, v, retval)
sys_sysarch(p, v, retval)
struct proc *p;
void *v;
register_t *retval;

View File

@ -1,4 +1,4 @@
/* $NetBSD: trap.c,v 1.41 1995/10/09 02:46:11 chopps Exp $ */
/* $NetBSD: trap.c,v 1.42 1995/10/09 04:34:08 chopps Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -707,7 +707,7 @@ syscall(code, frame)
* on the stack to skip, the argument follows the syscall
* number without a gap.
*/
if (code != SUNOS_SYS_sunos_sigreturn) {
if (code != SUNOS_SYS_sigreturn) {
frame.f_regs[SP] += sizeof (int);
/*
* remember that we adjusted the SP,