bug-glibc
[Top][All Lists]
Advanced

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

asm stuff in linuxthreads/spinlock.c


From: Daniel Elstner
Subject: asm stuff in linuxthreads/spinlock.c
Date: Sun, 29 Apr 2001 12:01:42 +0200

Hello,

I tried building glibc-2.2.3. Unfortunately the compilation fails
in linuxthreads/spinlock.c, GCC complains about inconsistent
constraints.

My system:
i686
Linux-2.4.4-SMP
gcc-2.95.4 (from CVS)
binutils-2.11

I looked in the GCC manual and guessed the following patch.
Although I have no clue wether this is correct, at least it
compiles ;)

--- spinlock.c.orig     Tue Mar 27 06:52:56 2001
+++ spinlock.c  Sun Apr 29 06:09:06 2001
@@ -88,7 +88,7 @@
          return;
        }
       }
-      __asm __volatile ("" : "=m" (lock->__status) : "0" (lock->__status));
+      __asm __volatile ("" : "+m" (lock->__status));
     }
 
     lock->__spinlock += (spin_count - lock->__spinlock) / 8;


make check seems to work, too.
Do I have a buggy gcc or is this really a glibc bug?

Regards,
Daniel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]