[cfe-commits] r70985 - /cfe/trunk/include/clang/AST/Builtins.def

Chris Lattner sabre at nondot.org
Tue May 5 10:48:56 PDT 2009


Author: lattner
Date: Tue May  5 12:48:42 2009
New Revision: 70985

URL: http://llvm.org/viewvc/llvm-project?rev=70985&view=rev
Log:
remove some incorrect and unimplemented atomic builtins (e.g. 
__sync_umin_and_fetch), add some missing atomic builtins (e.g.
__sync_fetch_and_nand) and reorder the list to match the GCC
documentation.  The builtins still need work and codegen 
implementation, more patches coming.

Modified:
    cfe/trunk/include/clang/AST/Builtins.def

Modified: cfe/trunk/include/clang/AST/Builtins.def
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Builtins.def?rev=70985&r1=70984&r2=70985&view=diff

==============================================================================
--- cfe/trunk/include/clang/AST/Builtins.def (original)
+++ cfe/trunk/include/clang/AST/Builtins.def Tue May  5 12:48:42 2009
@@ -201,25 +201,29 @@
 // FIXME: These should be overloaded for i8, i16, i32, and i64.
 BUILTIN(__sync_fetch_and_add,"ii*i", "n")
 BUILTIN(__sync_fetch_and_sub,"ii*i", "n")
+BUILTIN(__sync_fetch_and_or,"ii*i", "n")
+BUILTIN(__sync_fetch_and_and,"ii*i", "n")
+BUILTIN(__sync_fetch_and_xor,"ii*i", "n")
+BUILTIN(__sync_fetch_and_nand,"ii*i", "n")
+
+// GCC does not support these, they are a Clang extension.
 BUILTIN(__sync_fetch_and_min,"ii*i", "n")
 BUILTIN(__sync_fetch_and_max,"ii*i", "n")
 BUILTIN(__sync_fetch_and_umin,"UiUi*Ui", "n")
 BUILTIN(__sync_fetch_and_umax,"UiUi*Ui", "n")
-BUILTIN(__sync_fetch_and_and,"ii*i", "n")
-BUILTIN(__sync_fetch_and_or,"ii*i", "n")
-BUILTIN(__sync_fetch_and_xor,"ii*i", "n")
+
 BUILTIN(__sync_add_and_fetch,"ii*i", "n")
 BUILTIN(__sync_sub_and_fetch,"ii*i", "n")
-BUILTIN(__sync_min_and_fetch,"ii*i", "n")
-BUILTIN(__sync_max_and_fetch,"ii*i", "n")
-BUILTIN(__sync_umin_and_fetch,"UiUi*Ui", "n")
-BUILTIN(__sync_umax_and_fetch,"UiUi*Ui", "n")
-BUILTIN(__sync_and_and_fetch,"ii*i", "n")
 BUILTIN(__sync_or_and_fetch,"ii*i", "n")
+BUILTIN(__sync_and_and_fetch,"ii*i", "n")
 BUILTIN(__sync_xor_and_fetch,"ii*i", "n")
-BUILTIN(__sync_lock_test_and_set,"ii*i", "n")
+BUILTIN(__sync_nand_and_fetch,"ii*i", "n")
+
 BUILTIN(__sync_bool_compare_and_swap,"ii*ii", "n")
 BUILTIN(__sync_val_compare_and_swap,"ii*ii", "n")
+BUILTIN(__sync_lock_test_and_set,"ii*i", "n")
+BUILTIN(__sync_lock_release,"ii*i", "n")
+BUILTIN(__sync_synchronize, "v.", "n")
 
 // LLVM instruction builtin
 BUILTIN(__builtin_llvm_memory_barrier,"vbbbbb", "n")





More information about the cfe-commits mailing list