Re: __BIGGEST_ALIGNMENT / more on arch compiler defines

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hej, all.

Just to say what was done in the end, since it might help future archive
readers.

I'm now using __i386__ to detect and only 32-bit.  Beyond detecting
32-bit I don't think I can tell which processor I'm on, from the
compiler predefines.

What I then turn to however are the __GCC_HAVE_SYNC_COMPARE_AND_SWAP_N
predefines.

I use __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 as a proxy for being an i486 or
better (i386 lacks atomic operations).

Additionally, when __x86_64__ is defined, I then use
__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 to let me know if 128-bit CAS is
available (as some very early Opterons do not have it, and I can deal
with its absence gracefully and for free, so why not).




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux