Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-6]: src/sys/arch/acorn26/acorn26 Pull up revision 1.3 (requeste...



details:   https://anonhg.NetBSD.org/src/rev/15c43e0d62e5
branches:  netbsd-1-6
changeset: 529405:15c43e0d62e5
user:      he <he%NetBSD.org@localhost>
date:      Mon Nov 18 02:36:15 2002 +0000

description:
Pull up revision 1.3 (requested by bjh21 in ticket #689):
  New and much improved version of copyin(), copyout(), and
  kcopy() which works on both 26-bit and 32-bit machines.

diffstat:

 sys/arch/acorn26/acorn26/copyinout.S |  103 +----------------------------------
 1 files changed, 2 insertions(+), 101 deletions(-)

diffs (121 lines):

diff -r f848e332d19c -r 15c43e0d62e5 sys/arch/acorn26/acorn26/copyinout.S
--- a/sys/arch/acorn26/acorn26/copyinout.S      Mon Nov 18 02:35:46 2002 +0000
+++ b/sys/arch/acorn26/acorn26/copyinout.S      Mon Nov 18 02:36:15 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: copyinout.S,v 1.2 2002/03/24 23:37:42 bjh21 Exp $ */
+/* $NetBSD: copyinout.S,v 1.2.4.1 2002/11/18 02:36:15 he Exp $ */
 
 /*-
  * Copyright (c) 2000 Ben Harris
@@ -32,110 +32,11 @@
 
 #include <machine/asm.h>
 
-RCSID("$NetBSD: copyinout.S,v 1.2 2002/03/24 23:37:42 bjh21 Exp $")
+RCSID("$NetBSD: copyinout.S,v 1.2.4.1 2002/11/18 02:36:15 he Exp $")
 
 #include <sys/errno.h>
 #include "assym.h"
 
-/*
- * int copyin(const void *ua, void *ka, size_t len);
- * int copyout(const void *ka, void *ua, size_t len);
- * int kcopy(const void *src, void *dst, size_t len);
- */
-
-/*
- * memcpy isn't currently data-abort-safe (it uses R14).  This is much
- * slower, but safer.
- */
-
-/* LINTSTUB: Func: int copyin(const void *uaddr, void *kaddr, size_t len) */
-ENTRY(copyin)
-       mov     ip, sp
-       stmfd   sp!, {r4, fp, ip, lr, pc}
-       sub     fp, ip, #4
-       adr     r3, Lcopyfault
-       ldr     r4, Lcurproc
-       ldr     r4, [r4]
-       ldr     r4, [r4, #P_ADDR]
-       str     r3, [r4, #(U_PCB + PCB_ONFAULT)]
-       teq     r2, #0
-       beq     Lcopyinskip
-Lcopyinloop:
-       ldrbt   r3, [r0], #1
-       strb    r3, [r1], #1
-       subs    r2, r2, #1
-       bne     Lcopyinloop
-Lcopyinskip:
-       mov     r0, #0
-       str     r0, [r4, #(U_PCB + PCB_ONFAULT)]
-#ifdef __APCS_26__
-       ldmdb   fp, {r4, fp, sp, pc}^
-#else
-       ldmdb   fp, {r4, fp, sp, pc}
-#endif
-
-/* LINTSTUB: Func: int copyout(const void *kaddr, void *uaddr, size_t len) */
-ENTRY(copyout)
-       mov     ip, sp
-       stmfd   sp!, {r4, fp, ip, lr, pc}
-       sub     fp, ip, #4
-       adr     r3, Lcopyfault
-       ldr     r4, Lcurproc
-       ldr     r4, [r4]
-       ldr     r4, [r4, #P_ADDR]
-       str     r3, [r4, #(U_PCB + PCB_ONFAULT)]
-       teq     r2, #0
-       beq     Lcopyoutskip
-Lcopyoutloop:
-       ldrb    r3, [r0], #1
-       strbt   r3, [r1], #1
-       subs    r2, r2, #1
-       bne     Lcopyoutloop
-Lcopyoutskip:
-       mov     r0, #0
-       str     r0, [r4, #(U_PCB + PCB_ONFAULT)]
-#ifdef __APCS_26__
-       ldmdb   fp, {r4, fp, sp, pc}^
-#else
-       ldmdb   fp, {r4, fp, sp, pc}
-#endif
-
-/* LINTSTUB: Func: int kcopy(const void *kfaddr, void *kdaddr, size_t len) */
-ENTRY(kcopy)
-       mov     ip, sp
-       stmfd   sp!, {r4, fp, ip, lr, pc}
-       sub     fp, ip, #4
-       adr     r3, Lcopyfault
-       ldr     r4, Lcurproc
-       ldr     r4, [r4]
-       ldr     r4, [r4, #P_ADDR]
-       str     r3, [r4, #(U_PCB + PCB_ONFAULT)]
-       teq     r2, #0
-       beq     Lkcopyskip
-Lkcopyloop:
-       ldrb    r3, [r0], #1
-       strb    r3, [r1], #1
-       subs    r2, r2, #1
-       bne     Lkcopyloop
-Lkcopyskip:
-       mov     r0, #0
-       str     r0, [r4, #(U_PCB + PCB_ONFAULT)]
-#ifdef __APCS_26__
-       ldmdb   fp, {r4, fp, sp, pc}^
-#else
-       ldmdb   fp, {r4, fp, sp, pc}
-#endif
-
-Lcopyfault:
-       mov     r1, #0
-       str     r1, [r4, #(U_PCB + PCB_ONFAULT)]
-       /* Return value is provided by fault handler. */
-#ifdef __APCS_26__
-       ldmdb   fp, {r4, fp, sp, pc}^
-#else
-       ldmdb   fp, {r4, fp, sp, pc}
-#endif
-
 /* LINTSTUB: Func: int copyinstr(const void *uaddr, void *kaddr, size_t len, size_t *done) */
 ENTRY(copyinstr)
        mov     ip, sp



Home | Main Index | Thread Index | Old Index