diff options
author | Chris Lattner <sabre@nondot.org> | 2009-05-05 17:48:42 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-05-05 17:48:42 +0000 |
commit | b0ed3029d96e31dfa71a61ac5aa8d04710e0fb12 (patch) | |
tree | f9400781eacd4b0b64e50a7edf0742e837e2994b | |
parent | 4222f21c98e6fdd559f8beb1332663767c64b71e (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70985 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/AST/Builtins.def | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/include/clang/AST/Builtins.def b/include/clang/AST/Builtins.def index a14c9d85b0..bcfae4784f 100644 --- a/include/clang/AST/Builtins.def +++ b/include/clang/AST/Builtins.def @@ -201,25 +201,29 @@ BUILTIN(__builtin_alloca, "v*z" , "n") // 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") |