Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/i386/include Fix bus_space_write_multi_* in the mem...



details:   https://anonhg.NetBSD.org/src/rev/1ce8f9d30543
branches:  trunk
changeset: 508374:1ce8f9d30543
user:      fvdl <fvdl%NetBSD.org@localhost>
date:      Tue Apr 10 12:59:32 2001 +0000

description:
Fix bus_space_write_multi_* in the memory case; the asm constraints
were wrong.

diffstat:

 sys/arch/i386/include/bus.h |  70 ++++++++++++++++++++++++--------------------
 1 files changed, 38 insertions(+), 32 deletions(-)

diffs (192 lines):

diff -r ab078d430875 -r 1ce8f9d30543 sys/arch/i386/include/bus.h
--- a/sys/arch/i386/include/bus.h       Tue Apr 10 12:46:26 2001 +0000
+++ b/sys/arch/i386/include/bus.h       Tue Apr 10 12:59:32 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bus.h,v 1.31 2001/03/07 22:42:18 thorpej Exp $ */
+/*     $NetBSD: bus.h,v 1.32 2001/04/10 12:59:32 fvdl Exp $    */
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc.
@@ -254,14 +254,15 @@
        } else {                                                        \
                void *dummy1;                                           \
                int dummy2;                                             \
-               int __x __asm__("%eax");                                \
+               void *dummy3;                                           \
+               int __x;                                                \
                __asm __volatile("                                      \
                        cld                                     ;       \
-               1:      movb (%1),%%al                          ;       \
+               1:      movb (%2),%%al                          ;       \
                        stosb                                   ;       \
                        loop 1b"                                :       \
-                   "=&a" (__x), "=D" (dummy1), "=c" (dummy2)   :       \
-                   "r" ((h) + (o)), "1" ((a)), "2" ((c))       :       \
+                   "=D" (dummy1), "=c" (dummy2), "=r" (dummy3), "=&a" (__x) : \
+                   "0" ((a)), "1" ((c)), "2" ((h) + (o))       :       \
                    "memory");                                          \
        }                                                               \
 } while (0)
@@ -275,14 +276,15 @@
        } else {                                                        \
                void *dummy1;                                           \
                int dummy2;                                             \
-               int __x __asm__("%eax");                                \
+               void *dummy3;                                           \
+               int __x;                                                \
                __asm __volatile("                                      \
                        cld                                     ;       \
-               1:      movw (%1),%%ax                          ;       \
+               1:      movw (%2),%%ax                          ;       \
                        stosw                                   ;       \
                        loop 1b"                                :       \
-                   "=&a" (__x), "=D" (dummy1), "=c" (dummy2)   :       \
-                   "r" ((h) + (o)), "1" ((a)), "2" ((c))       :       \
+                   "=D" (dummy1), "=c" (dummy2), "=r" (dummy3), "=&a" (__x) : \
+                   "0" ((a)), "1" ((c)), "2" ((h) + (o))       :       \
                    "memory");                                          \
        }                                                               \
 } while (0)
@@ -296,14 +298,15 @@
        } else {                                                        \
                void *dummy1;                                           \
                int dummy2;                                             \
-               int __x __asm__("%eax");                                \
+               void *dummy3;                                           \
+               int __x;                                                \
                __asm __volatile("                                      \
                        cld                                     ;       \
-               1:      movl (%1),%%eax                         ;       \
+               1:      movl (%2),%%eax                         ;       \
                        stosl                                   ;       \
                        loop 1b"                                :       \
-                   "=&a" (__x), "=D" (dummy1), "=c" (dummy2)   :       \
-                   "r" ((h) + (o)), "1" ((a)), "2" ((c))       :       \
+                   "=D" (dummy1), "=c" (dummy2), "=r" (dummy3), "=&a" (__x) : \
+                   "0" ((a)), "1" ((c)), "2" ((h) + (o))       :       \
                    "memory");                                          \
        }                                                               \
 } while (0)
@@ -334,7 +337,7 @@
                int dummy1;                                             \
                void *dummy2;                                           \
                int dummy3;                                             \
-               int __x __asm__("%eax");                                \
+               int __x;                                                \
                __asm __volatile("                                      \
                        cld                                     ;       \
                1:      inb %w1,%%al                            ;       \
@@ -367,7 +370,7 @@
                int dummy1;                                             \
                void *dummy2;                                           \
                int dummy3;                                             \
-               int __x __asm__("%eax");                                \
+               int __x;                                                \
                __asm __volatile("                                      \
                        cld                                     ;       \
                1:      inw %w1,%%ax                            ;       \
@@ -400,7 +403,7 @@
                int dummy1;                                             \
                void *dummy2;                                           \
                int dummy3;                                             \
-               int __x __asm__("%eax");                                \
+               int __x;                                                \
                __asm __volatile("                                      \
                        cld                                     ;       \
                1:      inl %w1,%%eax                           ;       \
@@ -421,7 +424,7 @@
                        movsl"                                  :       \
                    "=S" (dummy1), "=D" (dummy2), "=c" (dummy3) :       \
                    "0" ((h) + (o)), "1" ((a)), "2" ((c))       :       \
-                   "%esi", "%edi", "%ecx", "memory");                  \
+                   "memory");                                          \
        }                                                               \
 } while (0)
 
@@ -496,14 +499,15 @@
        } else {                                                        \
                void *dummy1;                                           \
                int dummy2;                                             \
-               int __x __asm__("%eax");                                \
+               void *dummy3;                                           \
+               int __x;                                                \
                __asm __volatile("                                      \
                        cld                                     ;       \
                1:      lodsb                                   ;       \
-                       movb %%al,(%1)                          ;       \
+                       movb %%al,(%2)                          ;       \
                        loop 1b"                                :       \
-                   "=&a" (__x), "=S" (dummy1), "=c" (dummy2)   :       \
-                   "r" ((h) + (o)), "1" ((a)), "2" ((c)));             \
+                   "=S" (dummy1), "=c" (dummy2), "=r" (dummy3), "=&a" (__x) : \
+                   "0" ((a)), "1" ((c)), "2" ((h) + (o)));             \
        }                                                               \
 } while (0)
 
@@ -516,14 +520,15 @@
        } else {                                                        \
                void *dummy1;                                           \
                int dummy2;                                             \
-               int __x __asm__("%eax");                                \
+               void *dummy3;                                           \
+               int __x;                                                \
                __asm __volatile("                                      \
                        cld                                     ;       \
                1:      lodsw                                   ;       \
-                       movw %%ax,(%1)                          ;       \
+                       movw %%ax,(%2)                          ;       \
                        loop 1b"                                :       \
-                   "=&a" (__x), "=S" (dummy1), "=c" (dummy2)   :       \
-                   "r" ((h) + (o)), "1" ((a)), "2" ((c)));             \
+                   "=S" (dummy1), "=c" (dummy2), "=r" (dummy3), "=&a" (__x) : \
+                   "0" ((a)), "1" ((c)), "2" ((h) + (o)));             \
        }                                                               \
 } while (0)
 
@@ -536,14 +541,15 @@
        } else {                                                        \
                void *dummy1;                                           \
                int dummy2;                                             \
-               int __x __asm__("%eax");                                \
+               void *dummy3;                                           \
+               int __x;                                                \
                __asm __volatile("                                      \
                        cld                                     ;       \
                1:      lodsl                                   ;       \
-                       movl %%eax,(%1)                         ;       \
+                       movl %%eax,(%2)                         ;       \
                        loop 1b"                                :       \
-                   "=&a" (__x), "=S" (dummy1), "=c" (dummy2)   :       \
-                   "r" ((h) + (o)), "1" ((a)), "2" ((c)));             \
+                   "=S" (dummy1), "=c" (dummy2), "=r" (dummy3), "=&a" (__x) : \
+                   "0" ((a)), "1" ((c)), "2" ((h) + (o)));             \
        }                                                               \
 } while (0)
 
@@ -573,7 +579,7 @@
                int dummy1;                                             \
                void *dummy2;                                           \
                int dummy3;                                             \
-               int __x __asm__("%eax");                                \
+               int __x;                                                \
                __asm __volatile("                                      \
                        cld                                     ;       \
                1:      lodsb                                   ;       \
@@ -606,7 +612,7 @@
                int dummy1;                                             \
                void *dummy2;                                           \
                int dummy3;                                             \
-               int __x __asm__("%eax");                                \
+               int __x;                                                \
                __asm __volatile("                                      \
                        cld                                     ;       \
                1:      lodsw                                   ;       \
@@ -639,7 +645,7 @@
                int dummy1;                                             \
                void *dummy2;                                           \
                int dummy3;                                             \
-               int __x __asm__("%eax");                                \
+               int __x;                                                \
                __asm __volatile("                                      \
                        cld                                     ;       \
                1:      lodsl                                   ;       \



Home | Main Index | Thread Index | Old Index