Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm26/arm26 Allow for size=0 case in copyin(), copy...



details:   https://anonhg.NetBSD.org/src/rev/6d5040d3a81f
branches:  trunk
changeset: 504363:6d5040d3a81f
user:      bjh21 <bjh21%NetBSD.org@localhost>
date:      Wed Feb 28 11:55:39 2001 +0000

description:
Allow for size=0 case in copyin(), copyout() and kcopy().

diffstat:

 sys/arch/arm26/arm26/copyinout.S |  13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diffs (63 lines):

diff -r 205d53c82997 -r 6d5040d3a81f sys/arch/arm26/arm26/copyinout.S
--- a/sys/arch/arm26/arm26/copyinout.S  Wed Feb 28 05:53:59 2001 +0000
+++ b/sys/arch/arm26/arm26/copyinout.S  Wed Feb 28 11:55:39 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: copyinout.S,v 1.4 2001/01/09 12:11:57 bjh21 Exp $ */
+/* $NetBSD: copyinout.S,v 1.5 2001/02/28 11:55:39 bjh21 Exp $ */
 
 /*-
  * Copyright (c) 2000 Ben Harris
@@ -33,7 +33,7 @@
 
 #include <machine/asm.h>
 
-RCSID("$NetBSD: copyinout.S,v 1.4 2001/01/09 12:11:57 bjh21 Exp $")
+RCSID("$NetBSD: copyinout.S,v 1.5 2001/02/28 11:55:39 bjh21 Exp $")
 
 #include <sys/errno.h>
 #include "assym.h"
@@ -59,11 +59,14 @@
        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__
@@ -82,11 +85,14 @@
        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__
@@ -105,11 +111,14 @@
        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__



Home | Main Index | Thread Index | Old Index