Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/mvme68k/mvme68k Some minor optimisations.



details:   https://anonhg.NetBSD.org/src/rev/fdc3f2b5ee61
branches:  trunk
changeset: 499607:fdc3f2b5ee61
user:      scw <scw%NetBSD.org@localhost>
date:      Fri Nov 24 14:49:44 2000 +0000

description:
Some minor optimisations.

diffstat:

 sys/arch/mvme68k/mvme68k/softintr.c |  21 +++++++++++----------
 1 files changed, 11 insertions(+), 10 deletions(-)

diffs (48 lines):

diff -r 55d29acc2575 -r fdc3f2b5ee61 sys/arch/mvme68k/mvme68k/softintr.c
--- a/sys/arch/mvme68k/mvme68k/softintr.c       Fri Nov 24 14:08:14 2000 +0000
+++ b/sys/arch/mvme68k/mvme68k/softintr.c       Fri Nov 24 14:49:44 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: softintr.c,v 1.2 2000/11/20 19:35:30 scw Exp $ */
+/*     $NetBSD: softintr.c,v 1.3 2000/11/24 14:49:44 scw Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -67,12 +67,13 @@
        int __rv;
 
        __asm __volatile(
-               "       moveq   #0, %1  \n"
-               "       tas     %0      \n"
+               "       moveq   #0, %0  \n"
+               "       tas     %1      \n"
                "       jne     1f      \n"
-               "       moveq   #1, %1  \n"
+               "       moveq   #1, %0  \n"
                "1:                     \n"
-               : "=m" (*ssptr), "=d" (__rv));
+               : "=d" (__rv)
+               : "m" (*ssptr));
 
        return (__rv);
 }
@@ -119,15 +120,15 @@
 {
        struct mvme68k_soft_intr *msi;
        struct mvme68k_soft_intrhand *sih;
-       int i;
 
        while (ssir_pending(&ssir)) {
-               for (i = 0; i < IPL_NSOFT; i++) {
-                       if (ssir_pending(&mvme68k_soft_intrs[i].msi_ssir) == 0)
+               for (msi = mvme68k_soft_intrs;
+                   msi < &mvme68k_soft_intrs[IPL_NSOFT];
+                   msi++) {
+
+                       if (ssir_pending(&msi->msi_ssir) == 0)
                                continue;
 
-                       msi = &mvme68k_soft_intrs[i];
-
                        msi->msi_evcnt.ev_count++;
 
                        for (sih = LIST_FIRST(&msi->msi_q);



Home | Main Index | Thread Index | Old Index