This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFA: Remove alias usage from libgcc/sync.c
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Richard Sandiford <rdsandiford at googlemail dot com>
- Date: Fri, 11 Oct 2013 12:27:33 +0200
- Subject: Re: RFA: Remove alias usage from libgcc/sync.c
- Authentication-results: sourceware.org; auth=none
- References: <87ob6wp8oh dot fsf at talisman dot default> <CAFiYyc1cNcSgwXP4=OySk8d_3Wwx5uF4x=c3QEfjS_t3zsUZwg at mail dot gmail dot com> <20131011082136 dot GO30970 at tucnak dot zalov dot cz> <87bo2wta5l dot fsf at sandifor-thinkpad dot stglab dot manchester dot uk dot ibm dot com> <CAFiYyc3S3n0UK6WCdv4eWuLUA59HNDUbEv3bnGBM8MN9QPCECg at mail dot gmail dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Fri, Oct 11, 2013 at 12:16:03PM +0200, Richard Biener wrote:
> For the __sync functions it's unfortunate that the library function has
> the same 'name' as the builtin and the builtin doesn't have an alternate
> spelling. So - can't we just add __builtin__sync_... spellings and use
>
> __sync_synchronize ()
> {
> __builtin_sync_syncronize ();
> }
>
> ? (what if __builtin_sync_syncronize expands to a libcall? if it can't,
> what's the point of the library function?)
Actually, we already have a different spelling for that,
__sync_synchronize ()
should be equivalent to
__atomic_thread_fence (__ATOMIC_SEQ_CST)
though no idea what exactly it does on targets I'm not familiar with.
Jakub