Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/isa Adjust asm patterns for newer versions of GCC.



details:   https://anonhg.NetBSD.org/src/rev/8f98a69dca09
branches:  trunk
changeset: 485720:8f98a69dca09
user:      mycroft <mycroft%NetBSD.org@localhost>
date:      Wed May 03 21:20:07 2000 +0000

description:
Adjust asm patterns for newer versions of GCC.

diffstat:

 sys/dev/isa/seagate.c |  38 +++++++++++++++++++-------------------
 1 files changed, 19 insertions(+), 19 deletions(-)

diffs (64 lines):

diff -r d26e2729bd26 -r 8f98a69dca09 sys/dev/isa/seagate.c
--- a/sys/dev/isa/seagate.c     Wed May 03 21:08:02 2000 +0000
+++ b/sys/dev/isa/seagate.c     Wed May 03 21:20:07 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: seagate.c,v 1.36 2000/03/30 12:45:33 augustss Exp $    */
+/*     $NetBSD: seagate.c,v 1.37 2000/05/03 21:20:07 mycroft Exp $     */
 
 /*
  * ST01/02, Future Domain TMC-885, TMC-950 SCSI driver
@@ -1320,36 +1320,36 @@
                                                break;
                                        if (!(phase & STAT_IO)) {
 #ifdef SEA_ASSEMBLER
-                                               asm("shr $2, %%ecx\n\t\
-                                                   cld\n\t\
+                                               caddr_t junk;
+                                               asm("cld\n\t\
                                                    rep\n\t\
                                                    movsl" :
-                                                   "=S" (scb->data) :
+                                                   "=S" (scb->data),
+                                                   "=c" (len),
+                                                   "=D" (junk) :
                                                    "0" (scb->data),
-                                                   "D" (sea->maddr_dr),
-                                                   "c" (BLOCK_SIZE) :
-                                                   "%ecx", "%edi");
+                                                   "1" (BLOCK_SIZE >> 2),
+                                                   "2" (sea->maddr_dr));
 #else
-                                               for (count = 0;
-                                                   count < BLOCK_SIZE;
-                                                   count++)
+                                               for (len = BLOCK_SIZE;
+                                                   len; len--)
                                                        DATA = *(scb->data++);
 #endif
                                        } else {
 #ifdef SEA_ASSEMBLER
-                                               asm("shr $2, %%ecx\n\t\
-                                                   cld\n\t\
+                                               caddr_t junk;
+                                               asm("cld\n\t\
                                                    rep\n\t\
                                                    movsl" :
-                                                   "=D" (scb->data) :
-                                                   "S" (sea->maddr_dr),
+                                                   "=D" (scb->data),
+                                                   "=c" (len),
+                                                   "=S" (junk) :
                                                    "0" (scb->data),
-                                                   "c" (BLOCK_SIZE) :
-                                                   "%ecx", "%esi");
+                                                   "1" (BLOCK_SIZE >> 2),
+                                                   "2" (sea->maddr_dr));
 #else
-                                               for (count = 0;
-                                                   count < BLOCK_SIZE;
-                                                   count++)
+                                               for (len = BLOCK_SIZE;
+                                                   len; len--)
                                                        *(scb->data++) = DATA;
 #endif
                                        }



Home | Main Index | Thread Index | Old Index