public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Henderson <rth@redhat.com>
To: Andrew MacLeod <amacleod@redhat.com>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: patch - __sync_lock_test_and_set, __sync_lock_release fallback expansion
Date: Mon, 07 Nov 2011 19:37:00 -0000	[thread overview]
Message-ID: <4EB82EF1.5090401@redhat.com> (raw)
In-Reply-To: <4EB82DF3.4080900@redhat.com>

On 11/07/2011 11:13 AM, Andrew MacLeod wrote:
> 	libstdc++-v3
> 	* include/bits/atomic_base.h (atomic_thread_fence): Call builtin.
> 	(atomic_signal_fence): Call builtin.
> 	(atomic_flag::test_and_set): Call __atomic_exchange when it is lockfree,
> 	otherwise fall back to call __sync_lock_test_and_set.
> 	(atomic_flag::clear): Call __atomic_store when it is lockfree,
> 	otherwise fall back to call __sync_lock_release.
> 
> 	gcc
> 	* doc/extend.texi: Docuemnt behaviour change for __atomic_exchange and
> 	__atomic_store.
> 	* optabs.c (expand_atomic_exchange): Expand to __sync_lock_test_and_set
> 	only when originated from that builtin.
> 	(expand_atomic_store): Expand to __sync_lock_release when originated
> 	from that builtin.
> 	* builtins.c (expand_builtin_sync_lock_test_and_set): Add flag that
> 	expand_atomic_exchange call originated from here.
> 	(expand_builtin_sync_lock_release): Add flag that expand_atomic_store
> 	call originated from here.
> 	(expand_builtin_atomic_exchange): Add origination flag.
> 	(expand_builtin_atomic_store): Add origination flag.
> 	* expr.h (expand_atomic_exchange, expand_atomic_store): Add boolean 
> 	parameters to indicate implementation fall back options.

Looks good.


r~

      reply	other threads:[~2011-11-07 19:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-07 19:33 Andrew MacLeod
2011-11-07 19:37 ` Richard Henderson [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=4EB82EF1.5090401@redhat.com \
    --to=rth@redhat.com \
    --cc=amacleod@redhat.com \
    --cc=gcc-patches@gcc.gnu.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 read-only IMAP folder(s) and NNTP newsgroup(s).