Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/powerpc/ibm4xx copy{in,out}(): Add missing ``if (co...



details:   https://anonhg.NetBSD.org/src/rev/ba3ae7ebbe63
branches:  trunk
changeset: 369976:ba3ae7ebbe63
user:      rin <rin%NetBSD.org@localhost>
date:      Sun Sep 11 09:00:02 2022 +0000

description:
copy{in,out}(): Add missing ``if (count == 0) goto done;''.

diffstat:

 sys/arch/powerpc/ibm4xx/trap.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (34 lines):

diff -r 0deb51de373d -r ba3ae7ebbe63 sys/arch/powerpc/ibm4xx/trap.c
--- a/sys/arch/powerpc/ibm4xx/trap.c    Sun Sep 11 08:57:39 2022 +0000
+++ b/sys/arch/powerpc/ibm4xx/trap.c    Sun Sep 11 09:00:02 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: trap.c,v 1.91 2022/09/11 08:57:39 rin Exp $    */
+/*     $NetBSD: trap.c,v 1.92 2022/09/11 09:00:02 rin Exp $    */
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -69,7 +69,7 @@
 #define        __UFETCHSTORE_PRIVATE
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.91 2022/09/11 08:57:39 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.92 2022/09/11 09:00:02 rin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
@@ -484,6 +484,7 @@
                "bdnz   1b;"                    /* repeat */
 
        "2:"    "andi.  %[count],%[len],0x3;"   /* How many remaining bytes? */
+               "beq    10f;"
                "addi   %[count],%[count],0x1;"
                "mtctr  %[count];"
        "3:"    "bdz    10f;"                   /* while count */
@@ -603,6 +604,7 @@
                "bdnz   1b;"                    /* repeat */
 
        "2:"    "andi.  %[count],%[len],0x3;"   /* How many remaining bytes? */
+               "beq    10f;"
                "addi   %[count],%[count],0x1;"
                "mtctr  %[count];"
        "3:"    "bdz    10f;"                   /* while count */



Home | Main Index | Thread Index | Old Index