This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Add atomic type qualifier
- From: Andrew MacLeod <amacleod at redhat dot com>
- To: Andrew MacLeod <amacleod at redhat dot com>
- Cc: "Joseph S. Myers" <joseph at codesourcery dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>, hp at bitrange dot com, Richard Henderson <rth at redhat dot com>
- Date: Mon, 29 Jul 2013 12:12:26 -0400
- Subject: Re: [PATCH] Add atomic type qualifier
- References: <51F2AEB1 dot 60408 at redhat dot com> <Pine dot LNX dot 4 dot 64 dot 1307281928000 dot 28065 at digraph dot polyomino dot org dot uk> <51F6836F dot 6080400 at redhat dot com>
On 07/29/2013 10:59 AM, Andrew MacLeod wrote:
Blick. What were they smoking the night before... I guess we'll
probably need to enhance the current atomic patterns in RTL... We
should be able to figure out that its floating point and invoke the
appropriate RTL pattern during expansion rather than an existing
one. OR just frigging call libatomic and let it deal with it. :-)
I guess there wouldnt be any other fallback available. Actually, thats
a mess... no way for the librtary to know its floating point unless
you tell it somehow with new entry points or somesuch.. very lame.
Actually, in hind sight, we will need new atomic builtins.... It lists
other operators we need to support that we currently do not: They list
*, / , % + - << >> & ^ |
we currently don't support *,/, modulus, right or left shift.
Maybe the simple thing is simply to emit the compare_exchange loop for
all these, and not bother libatomic with them at all. We can
eventually add rtl patterns for them if we want "better performance" for
these new bits.
As for the floating point operations, emit the same loop, and if there
is a target pattern emit it, otherwise issue a warning saying those
footnote items are not properly protected or whatever.
Also, If I read this right, "arithmetic type" also includes complex type
does it not? which means we need to support this for complex as well...
Does C++14(or onward) intend to support these additions as well?
Andrew