This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC libatomic ABI specification draft
- From: Szabolcs Nagy <szabolcs dot nagy at arm dot com>
- To: Segher Boessenkool <segher at kernel dot crashing dot org>, Ulrich Weigand <uweigand at de dot ibm dot com>
- Cc: <nd at arm dot com>, Torvald Riegel <triegel at redhat dot com>, Gabriel Paubert <paubert at iram dot es>, "Bin Fan@Work" <bin dot x dot fan at oracle dot com>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>, <Andreas dot Krebbel at de dot ibm dot com>, <dje dot gcc at gmail dot com>
- Date: Wed, 4 Jan 2017 11:25:09 +0000
- Subject: Re: GCC libatomic ABI specification draft
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=Szabolcs dot Nagy at arm dot com;
- Nodisclaimer: True
- References: <58593903.4020508@arm.com> <20161222142856.C5B931032A2@oc8523832656.ibm.com> <20161222173747.GK11295@gate.crashing.org>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
On 22/12/16 17:37, Segher Boessenkool wrote:
> We do not always have all atomic instructions. Not all processors have
> all, and it depends on the compiler flags used which are used. How would
> libatomic know what compiler flags are used to compile the program it is
> linked to?
>
> Sounds like a job for multilibs?
x86_64 uses ifunc dispatch to always use atomic
instructions if available (which is bad because
ifunc is not supported on all platforms).
either such runtime feature detection and dispatch
is needed in libatomic or different abis have to
be supported (with the usual hassle).