[llvm-commits] CVS: llvm-gcc/libstdc++-v3/config/cpu/ia64/atomicity.h
Chris Lattner
lattner at cs.uiuc.edu
Fri Jul 16 19:39:51 PDT 2004
Changes in directory llvm-gcc/libstdc++-v3/config/cpu/ia64:
atomicity.h updated: 1.1.1.1 -> 1.2
---
Log message:
ia64 support for LLVM
---
Diffs of the changes: (+11 -0)
Index: llvm-gcc/libstdc++-v3/config/cpu/ia64/atomicity.h
diff -u llvm-gcc/libstdc++-v3/config/cpu/ia64/atomicity.h:1.1.1.1 llvm-gcc/libstdc++-v3/config/cpu/ia64/atomicity.h:1.2
--- llvm-gcc/libstdc++-v3/config/cpu/ia64/atomicity.h:1.1.1.1 Thu Jan 8 15:59:29 2004
+++ llvm-gcc/libstdc++-v3/config/cpu/ia64/atomicity.h Fri Jul 16 21:39:41 2004
@@ -38,14 +38,25 @@
__attribute__ ((__unused__))
__exchange_and_add (volatile _Atomic_word *__mem, int __val)
{
+#ifdef __llvm__
+ register _Atomic_word __result;
+ __result = *__mem;
+ *__mem += __val;
+ return __result;
+#else
return __sync_fetch_and_add (__mem, __val);
+#endif
}
static inline void
__attribute__ ((__unused__))
__atomic_add (volatile _Atomic_word* __mem, int __val)
{
+#ifdef __llvm__
+ __exchange_and_add(__mem, __val);
+#else
__sync_fetch_and_add (__mem, __val);
+#endif
}
#endif /* atomicity.h */
More information about the llvm-commits
mailing list