On 24/07/18 22:55, Steve Ellcey wrote: > On Tue, 2018-07-24 at 22:04 +0100, James Greenhalgh wrote: >> >> >> I'd say this patch isn't desirable for trunk. I'd be interested in use cases >> that need a static decision on presence of LSE that are not better expressed >> using higher level language features. >> >> Thanks, >> James > > How about when building the higher level features? Right now, > in sysdeps/aarch64/atomic-machine.h, we > hardcode ATOMIC_EXCHANGE_USES_CAS to 0. If we had __ARM_FEATURE_LSE we > could use that to determine if we wanted to set > ATOMIC_EXCHANGE_USES_CAS to 0 or 1 which would affect the call > generated in nptl/pthread_spin_lock.c. That would be useful if we > built a lipthread specifically for a platform that had LSE. > > Steve Ellcey > sell...@cavium.com >
If there is a case for such a define, it needs to be made with the ACLE specification maintainers. I don't think GCC should be ploughing a separate furrow here. So make your case to the ACLE maintainers. If that adopts a pre-define, then implementing it in GCC would go through on the nod. R.