[RFA] Using the new atomicity builtins
Paolo Carlini
pcarlini@suse.de
Tue May 24 12:15:00 GMT 2005
Paolo Carlini wrote:
>An annoyance is with the i*86 targets: the target bits are implemented
>only for i486 and later (for the "obvious" reasons) but, by default, g++
>generates code runnable also on i386. Therefore we have to somehow
>detect whether -march=i486 was passed and switch from the fall back
>(whichever it is) to the actual builtin, basing on that. That's why my
>first block of work doesn't include i686, which actually is also done,
>in the compiler. Ideas about the best way to do this? Also, in case of
>x86_64 in real 64-bit mode (vs 32-bit mode) this is not a problem, of
>course, but we have to check for that. Annoying. Ideas about the best
>way to deal with such issues? Is __i486__ or similar going to work?
>
>
Steven Bosscher suggested privately that maybe a builtin define is the
best solution. It looks like could boil down to something as simple as
(in gcc/config/i386/i386.h):
if (!TARGET_386)
builtin_define ("__x86_atomic__");
that would encompass everything i?86 and x86_64 related.
Paolo.
More information about the Libstdc++
mailing list