Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/m68k/include Fix asm constraints. Sun3 kernels bui...



details:   https://anonhg.NetBSD.org/src/rev/c0b759cee650
branches:  trunk
changeset: 521179:c0b759cee650
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Fri Jan 25 16:42:22 2002 +0000

description:
Fix asm constraints.  Sun3 kernels built with the new toolchain boot now.

diffstat:

 sys/arch/m68k/include/asm_single.h |  31 ++++++++++++++++++++++++-------
 1 files changed, 24 insertions(+), 7 deletions(-)

diffs (51 lines):

diff -r ef52b78fbdf4 -r c0b759cee650 sys/arch/m68k/include/asm_single.h
--- a/sys/arch/m68k/include/asm_single.h        Fri Jan 25 16:10:35 2002 +0000
+++ b/sys/arch/m68k/include/asm_single.h        Fri Jan 25 16:42:22 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: asm_single.h,v 1.3 1998/07/25 09:24:17 is Exp $        */
+/*     $NetBSD: asm_single.h,v 1.4 2002/01/25 16:42:22 thorpej Exp $   */
 
 /*
  * Copyright (c) 1996 Leo Weppelman.
@@ -41,18 +41,35 @@
  */
 
 #define single_inst_bset_b(var, bit)   \
-       __asm__ __volatile ("orb %0,%1" : : "di" ((u_char)bit), "g" (var))
+       __asm __volatile ("orb %1,%0"   \
+               : "=m" (var)            \
+               : "di" ((u_char)bit), "0" (var))
+
 #define single_inst_bclr_b(var, bit)   \
-       __asm__ __volatile ("andb %0,%1" : : "di" ((u_char)~(bit)), "g" (var))
+       __asm __volatile ("andb %1,%0"  \
+               : "=m" (var)            \
+               : "di" ((u_char)~(bit)), "0" (var))
+
 
 #define single_inst_bset_w(var, bit)   \
-       __asm__ __volatile ("orw %0,%1" : : "di" ((u_short)bit), "g" (var))
+       __asm __volatile ("orw %1,%0"   \
+               : "=m" (var)            \
+               : "di" ((u_short)bit), "0" (var))
+
 #define single_inst_bclr_w(var, bit)   \
-       __asm__ __volatile ("andw %0,%1" : : "di" ((u_short)~(bit)), "g" (var))
+       __asm __volatile ("andw %1,%0"  \
+               : "=m" (var)            \
+               : "di" ((u_short)~(bit)), "0" (var))
+
 
 #define single_inst_bset_l(var, bit)   \
-       __asm__ __volatile ("orl %0,%1" : : "di" ((u_long)bit), "g" (var))
+       __asm __volatile ("orl %1,%0"   \
+               : "=m" (var)            \
+               : "di" ((u_long)bit), "0" (var))
+
 #define single_inst_bclr_l(var, bit)   \
-       __asm__ __volatile ("andl %0,%1" : : "di" ((u_long)~(bit)), "g" (var))
+       __asm __volatile ("andl %1,%0"  \
+               : "=m" (var)            \
+               : "di" ((u_long)~(bit)), "0" (var))
 
 #endif /* _M68K_ASM_SINGLE_H */



Home | Main Index | Thread Index | Old Index