This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[Daniel Elstner <daniel.elstner@gmx.net>] asm stuff in linuxthreads/spinlock.c



Hi GCC & Glibc developers,

Is this a compiler bug or a glibc bug?

Andreas



Topics:
   asm stuff in linuxthreads/spinlock.c





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

_______________________________________________
Bug-glibc mailing list
Bug-glibc@gnu.org
http://mail.gnu.org/mailman/listinfo/bug-glibc





-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]