[llvm-commits] CVS: llvm-gcc/libstdc++-v3/config/cpu/sparc/atomicity.h

Brian Gaeke gaeke at cs.uiuc.edu
Fri Oct 8 20:00:23 PDT 2004



Changes in directory llvm-gcc/libstdc++-v3/config/cpu/sparc:

atomicity.h updated: 1.2 -> 1.3
---
Log message:

Disable inline assembly for 32-bit SPARC when compiling with llvm-g++.


---
Diffs of the changes:  (+8 -0)

Index: llvm-gcc/libstdc++-v3/config/cpu/sparc/atomicity.h
diff -u llvm-gcc/libstdc++-v3/config/cpu/sparc/atomicity.h:1.2 llvm-gcc/libstdc++-v3/config/cpu/sparc/atomicity.h:1.3
--- llvm-gcc/libstdc++-v3/config/cpu/sparc/atomicity.h:1.2	Fri Jan  9 10:54:35 2004
+++ llvm-gcc/libstdc++-v3/config/cpu/sparc/atomicity.h	Fri Oct  8 22:00:08 2004
@@ -98,6 +98,7 @@
 {
   _Atomic_word __result, __tmp;
 
+#ifndef __llvm__
   __asm__ __volatile__("1:	ldstub	[%1], %0\n\t"
 		       "	cmp	%0, 0\n\t"
 		       "	bne	1b\n\t"
@@ -105,12 +106,15 @@
 		       : "=&r" (__tmp)
 		       : "r" (&__Atomicity_lock<0>::_S_atomicity_lock)
 		       : "memory");
+#endif
   __result = *__mem;
   *__mem += __val;
+#ifndef __llvm__
   __asm__ __volatile__("stb	%%g0, [%0]"
 		       : /* no outputs */
 		       : "r" (&__Atomicity_lock<0>::_S_atomicity_lock)
 		       : "memory");
+#endif
   return __result;
 }
 
@@ -120,6 +124,7 @@
 {
   _Atomic_word __tmp;
 
+#ifndef __llvm__
   __asm__ __volatile__("1:	ldstub	[%1], %0\n\t"
 		       "	cmp	%0, 0\n\t"
 		       "	bne	1b\n\t"
@@ -127,11 +132,14 @@
 		       : "=&r" (__tmp)
 		       : "r" (&__Atomicity_lock<0>::_S_atomicity_lock)
 		       : "memory");
+#endif
   *__mem += __val;
+#ifndef __llvm__
   __asm__ __volatile__("stb	%%g0, [%0]"
 		       : /* no outputs */
 		       : "r" (&__Atomicity_lock<0>::_S_atomicity_lock)
 		       : "memory");
+#endif
 }
 
 #endif /* __arch32__ */






More information about the llvm-commits mailing list