linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
To: linux-sparse@vger.kernel.org
Cc: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Subject: [PATCH 12/12] builtin: add support for remaining atomic builtins
Date: Sun, 18 Oct 2020 00:56:33 +0200	[thread overview]
Message-ID: <20201017225633.53274-13-luc.vanoostenryck@gmail.com> (raw)
In-Reply-To: <20201017225633.53274-1-luc.vanoostenryck@gmail.com>

Nothing special for these ones, just plain functions with fixed
types and arity.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
 builtin.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/builtin.c b/builtin.c
index 1c502597315f..bb0f11b9428b 100644
--- a/builtin.c
+++ b/builtin.c
@@ -482,6 +482,7 @@ static const struct builtin_fn builtins_common[] = {
 #define va_list_ctype	&ptr_ctype
 #define vol_ptr		&volatile_ptr_ctype
 	{ "__atomic_add_fetch", NULL, 0, { vol_ptr, &dyntype, &int_ctype }, .op = &atomic_op },
+	{ "__atomic_always_lock_free", &bool_ctype, 0, { size_t_ctype, vol_ptr }},
 	{ "__atomic_and_fetch", NULL, 0, { vol_ptr, &dyntype, &int_ctype }, .op = &atomic_op },
 	{ "__atomic_clear", &void_ctype, 0, { &volatile_bool_ptr_ctype, &int_ctype }},
 	{ "__atomic_compare_exchange", &bool_ctype, 0, { vol_ptr, &ptr_ctype, &ptr_ctype, &bool_ctype, &int_ctype, &int_ctype }, .op = &atomic_op },
@@ -494,13 +495,17 @@ static const struct builtin_fn builtins_common[] = {
 	{ "__atomic_fetch_or",  NULL, 0, { vol_ptr, &dyntype, &int_ctype }, .op = &atomic_op },
 	{ "__atomic_fetch_sub", NULL, 0, { vol_ptr, &dyntype, &int_ctype }, .op = &atomic_op },
 	{ "__atomic_fetch_xor", NULL, 0, { vol_ptr, &dyntype, &int_ctype }, .op = &atomic_op },
+	{ "__atomic_is_lock_free", &bool_ctype, 0, { size_t_ctype, vol_ptr }},
 	{ "__atomic_load", &void_ctype, 0, { vol_ptr, &ptr_ctype, &int_ctype }, .op = &atomic_op },
 	{ "__atomic_load_n", NULL, 0, { vol_ptr, &int_ctype }, .op = &atomic_op },
 	{ "__atomic_nand_fetch",NULL, 0, { vol_ptr, &dyntype, &int_ctype }, .op = &atomic_op },
 	{ "__atomic_or_fetch",  NULL, 0, { vol_ptr, &dyntype, &int_ctype }, .op = &atomic_op },
+	{ "__atomic_signal_fence", &void_ctype, 0, { &int_ctype }},
 	{ "__atomic_store", &void_ctype, 0, { vol_ptr, &ptr_ctype, &int_ctype }, .op = &atomic_op },
 	{ "__atomic_store_n", &void_ctype, 0, { vol_ptr, &dyntype, &int_ctype }, .op = &atomic_op },
 	{ "__atomic_sub_fetch", NULL, 0, { vol_ptr, &dyntype, &int_ctype }, .op = &atomic_op },
+	{ "__atomic_test_and_set", &bool_ctype, 0, { vol_ptr, &int_ctype }},
+	{ "__atomic_thread_fence", &void_ctype, 0, { &int_ctype }},
 	{ "__atomic_xor_fetch", NULL, 0, { vol_ptr, &dyntype, &int_ctype }, .op = &atomic_op },
 	{ "__builtin_choose_expr", NULL, 1, .op = &choose_op },
 	{ "__builtin_constant_p", NULL, 1, .op = &constant_p_op },
-- 
2.28.0


      parent reply	other threads:[~2020-10-17 22:56 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-17 22:56 [PATCH 00/12] fix and complete the evaluation of atomic builtins Luc Van Oostenryck
2020-10-17 22:56 ` [PATCH 01/12] builtin: add generic .args method Luc Van Oostenryck
2020-10-17 22:56 ` [PATCH 02/12] builtin: add builtin type for volatile void * Luc Van Oostenryck
2020-10-17 22:56 ` [PATCH 03/12] builtin: make eval_sync_compare_and_swap() more generic Luc Van Oostenryck
2020-10-18 21:31   ` Ramsay Jones
2020-10-19  4:59     ` Luc Van Oostenryck
2020-10-17 22:56 ` [PATCH 04/12] builtin: evaluate __sync_*_fetch*() Luc Van Oostenryck
2020-10-18 23:59   ` Ramsay Jones
2020-10-19  4:44     ` Luc Van Oostenryck
2020-10-17 22:56 ` [PATCH 05/12] builtin: fix evaluation of __sync_lock_release Luc Van Oostenryck
2020-10-17 22:56 ` [PATCH 06/12] builtin: __sync_synchronize() too is variadic Luc Van Oostenryck
2020-10-17 22:56 ` [PATCH 07/12] builtin: add predefines for __ATOMIC_RELAXED & friends Luc Van Oostenryck
2020-10-17 22:56 ` [PATCH 08/12] builtin: add support for __atomic_add_fetch(), Luc Van Oostenryck
2020-10-17 22:56 ` [PATCH 09/12] builtin: add support for others generic atomic builtins Luc Van Oostenryck
2020-10-17 22:56 ` [PATCH 10/12] builtin: add builtin type: [volatile] pointer to bool Luc Van Oostenryck
2020-10-17 22:56 ` [PATCH 11/12] builtin: add support for __atomic_clear() Luc Van Oostenryck
2020-10-17 22:56 ` Luc Van Oostenryck [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201017225633.53274-13-luc.vanoostenryck@gmail.com \
    --to=luc.vanoostenryck@gmail.com \
    --cc=linux-sparse@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).