Upon further reflection, move udiv/urem to libkern and out of vax/vax.

This commit is contained in:
matt 2002-02-24 00:08:19 +00:00
parent 87806a826d
commit 6cad4b795d
8 changed files with 59 additions and 61 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: files.vax,v 1.92 2002/02/23 23:48:00 matt Exp $
# $NetBSD: files.vax,v 1.93 2002/02/24 00:08:21 matt Exp $
#
# new style config file for vax architecture
#
@ -354,8 +354,6 @@ file arch/vax/vax/emulate.S !no_insn_emulate
file arch/vax/vax/unimpl_emul.S !no_insn_emulate
file arch/vax/vax/scb.c
file arch/vax/vax/conf.c
file arch/vax/vax/urem.S
file arch/vax/vax/udiv.S
file arch/vax/vax/trap.c
file arch/vax/vax/bus_dma.c
file arch/vax/vax/bus_mem.c

View File

@ -1,6 +1,6 @@
# $NetBSD: Makefile.inc,v 1.14 2002/02/10 22:04:51 thorpej Exp $
# $NetBSD: Makefile.inc,v 1.15 2002/02/24 00:08:22 matt Exp $
#
# The rest of the lib routines are in machine/macros.h
#
SRCS+= __main.c __assert.c blkcpy.S blkset.S random.S strncmp.c \
strcasecmp.c strncasecmp.c bswap64.S
SRCS+= __assert.c __main.c blkcpy.S blkset.S bswap64.S random.S \
strcasecmp.c strncasecmp.c strncmp.c udiv.S urem.S

View File

@ -1,4 +1,4 @@
/* $NetBSD: blkcpy.S,v 1.1 2002/02/10 22:04:51 thorpej Exp $ */
/* $NetBSD: blkcpy.S,v 1.2 2002/02/24 00:08:22 matt Exp $ */
/*
* Copyright (c) 1994 Ludd, University of Lule}, Sweden.
@ -36,14 +36,14 @@
* Copy a block of memory larger than 64K.
*/
ENTRY(__blkcpy,R6)
movl 4(ap),r1
movl 8(ap),r3
movl 12(ap),r6
movl 4(%ap),%r1
movl 8(%ap),%r3
movl 12(%ap),%r6
jbr 2f
1: subl2 r0,r6
movc3 r0,(r1),(r3)
2: movzwl $65535,r0
cmpl r6,r0
1: subl2 %r0,%r6
movc3 %r0,(%r1),(%r3)
2: movzwl $65535,%r0
cmpl %r6,%r0
jgtr 1b
movc3 r6,(r1),(r3)
movc3 %r6,(%r1),(%r3)
ret

View File

@ -1,4 +1,4 @@
/* $NetBSD: blkset.S,v 1.2 2002/02/19 21:46:17 ragge Exp $ */
/* $NetBSD: blkset.S,v 1.3 2002/02/24 00:08:22 matt Exp $ */
/*
* Copyright (c) 1994 Ludd, University of Lule}, Sweden.
@ -36,14 +36,14 @@
* Set a block of memory larger than 64K.
*/
ENTRY(__blkset,R6|R7)
movl 4(ap), r3
movl 8(ap), r7
movl 12(ap), r6
movl 4(%ap), %r3
movl 8(%ap), %r7
movl 12(%ap), %r6
jbr 2f
1: subl2 r0, r6
movc5 $0,(r3),r7,r0,(r3)
2: movzwl $65535,r0
cmpl r6, r0
1: subl2 %r0, %r6
movc5 $0,(%r3),%r7,%r0,(%r3)
2: movzwl $65535,%r0
cmpl %r6, %r0
jgtr 1b
movc5 $0,(r3),r7,r6,(r3)
movc5 $0,(%r3),%r7,%r6,(%r3)
ret

View File

@ -1,19 +1,19 @@
/* Written by Anders Magnusson. Public Domain */
#if defined(LIBC_SCCS) && !defined(lint)
.asciz "$NetBSD: bswap64.S,v 1.2 1999/01/19 22:54:53 ragge Exp $"
.asciz "$NetBSD: bswap64.S,v 1.3 2002/02/24 00:08:23 matt Exp $"
#endif /* LIBC_SCCS and not lint */
#include <machine/asm.h>
ENTRY(bswap64, 0)
movq 4(ap),r3
rotl $-8,r3,r1
insv r1,$16,$8,r1
rotl $8,r3,r2
movb r2,r1
rotl $-8,r4,r0
insv r0,$16,$8,r0
rotl $8,r4,r2
movb r2,r0
movq 4(%ap),%r3
rotl $-8,%r3,%r1
insv %r1,$16,$8,%r1
rotl $8,%r3,%r2
movb %r2,%r1
rotl $-8,%r4,%r0
insv %r0,$16,$8,%r0
rotl $8,%r4,%r2
movb %r2,%r0
ret

View File

@ -1,4 +1,4 @@
/* $NetBSD: random.S,v 1.2 2000/07/19 03:48:24 matt Exp $ */
/* $NetBSD: random.S,v 1.3 2002/02/24 00:08:23 matt Exp $ */
/*
* Copyright (c) 1990,1993 The Regents of the University of California.
@ -53,31 +53,31 @@ randseed:
.long 1
ENTRY(random, 0)
movl $16807,r0
movl $16807,%r0
movl randseed,r1 # r2=16807*loword(randseed)
bicl3 $0xffff0000,r1,r2
mull2 r0,r2
ashl $-16,r1,r1 # r1=16807*hiword(randseed)
bicl2 $0xffff0000,r1
mull2 r0,r1
bicl3 $0xffff0000,r2,r0
ashl $-16,r2,r2 # r1+=(r2>>16)
bicl2 $0xffff0000,r2
addl2 r2,r1
ashl $16,r1,r2 # r0|=r1<<16
bisl2 r2,r0
ashl $-16,r1,r1 # r1=r1>>16
movl randseed,%r1 # %r2=16807*loword(randseed)
bicl3 $0xffff0000,%r1,%r2
mull2 %r0,%r2
ashl $-16,%r1,%r1 # %r1=16807*hiword(randseed)
bicl2 $0xffff0000,%r1
mull2 %r0,%r1
bicl3 $0xffff0000,%r2,%r0
ashl $-16,%r2,%r2 # %r1+=(%r2>>16)
bicl2 $0xffff0000,%r2
addl2 %r2,%r1
ashl $16,%r1,%r2 # %r0|=%r1<<16
bisl2 %r2,%r0
ashl $-16,%r1,%r1 # %r1=%r1>>16
ashl $1,r1,r1
movl r0,r2
rotl $1,r0,r0
bicl2 $0xfffffffe,r0
bisl2 r0,r1
movl r2,r0
bicl2 $0x80000000,r0
addl2 r1,r0
ashl $1,%r1,%r1
movl %r0,%r2
rotl $1,%r0,%r0
bicl2 $0xfffffffe,%r0
bisl2 %r0,%r1
movl %r2,%r0
bicl2 $0x80000000,%r0
addl2 %r1,%r0
bgeq L1
subl2 $0x7fffffff,r0
L1: movl r0,randseed
subl2 $0x7fffffff,%r0
L1: movl %r0,randseed
ret

View File

@ -1,4 +1,4 @@
/* $NetBSD: udiv.S,v 1.1 2002/02/23 23:48:05 matt Exp $ */
/* $NetBSD: udiv.S,v 1.1 2002/02/24 00:08:23 matt Exp $ */
/*-
* Copyright (c) 1991 The Regents of the University of California.

View File

@ -1,4 +1,4 @@
/* $NetBSD: urem.S,v 1.1 2002/02/23 23:48:07 matt Exp $ */
/* $NetBSD: urem.S,v 1.1 2002/02/24 00:08:23 matt Exp $ */
/*-
* Copyright (c) 1991 The Regents of the University of California.