This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [rfc] atomic memory operation builtins
On Sat, Apr 09, 2005 at 11:03:08PM +0200, Ulrich Weigand wrote:
> I have two concerns with implementing s390 back end support:
>
> - We only have compare-and-swap instructions for SImode and DImode,
> not for HImode or QImode.
>
> - The compare-and-swap insns require that their memory argument
> is naturally aligned, or else they throw an exception.
As for ia64.
> Normally, I'd just say that users should live with these
> restrictions; they don't significantly impact any of the
> usual use cases for atomic operations.
>
> However, your documentation suggests the new builtins will be
> supported always, via external helper functions if necessary.
No, just let them be not implemented and thus undefined symbols.
The helper functions were intended to be of use for targets that
don't have any usable atomic instructions. Like embedded targets
that actually have to turn off interrupts.
r~