This is the mail archive of the
mailing list for the binutils project.
Re: GAS .fpu directive
- From: Peter Bergner <bergner at vnet dot ibm dot com>
- To: Renato Golin <renato dot golin at linaro dot org>
- Cc: Richard Earnshaw <rearnsha at arm dot com>, Nicholas Clifton <nickc at redhat dot com>, "binutils at sourceware dot org" <binutils at sourceware dot org>
- Date: Wed, 20 Aug 2014 14:14:27 -0500
- Subject: Re: GAS .fpu directive
- Authentication-results: sourceware.org; auth=none
- References: <CAMSE1keWd0+uUS0fpaC3-yXsnN-z2_Bsa5anwvQAQwXgWuw_Yw at mail dot gmail dot com> <53F4C261 dot 8090900 at redhat dot com> <53F4CB31 dot 9080701 at arm dot com> <1408553484 dot 5894 dot 8 dot camel at otta> <CAMSE1kdDQOuuKhPcF8qasM-PMXBkAKDfjioCmYc39cORV3o4gA at mail dot gmail dot com>
On Wed, 2014-08-20 at 19:02 +0100, Renato Golin wrote:
> On 20 August 2014 17:51, Peter Bergner <email@example.com> wrote:
> > I also forgot about GCC's function specific optimization support
> > which would require this:
> > https://gcc.gnu.org/wiki/FunctionSpecificOpt
> So, ARCH, CPU and FPU options are not monotonic crescent (ex. this is
> not necessarily true in all contexts: a7 < a8 < a9 < a15) and extra
> flags (like +neon, +crypto, +d16) make it a multi-axis vector space.
> How do you choose the value for the appropriate build attributes in
> this case and avoid linking unsupported libraries?
Well the common use of the above is to have one library that contains
multiple versions of specific functions optimized for specific cpus.
When someone calls a function say foo(), there would be a IFUNC resolver
that at runtime chooses which optimized version of foo() the user
branches to. In your case, if you have a function foo() that has been
optimized for a7, a8, a9 and a15, then the resolver could be used to
direct the users call to foo() the the appropriate optimzed version
depending on what cpu their binary happened to be running on. The IFUNC
resolver could use other criteria other than cpu value if you want.
Maybe code size, or ...
> PS: Should this usage and semantics be documented somewhere in
> binutils' wiki/docs?
The gas docs are here:
The powerpc specific doc for .machine [<cpu>|"push"|"pop"] is here:
Looking at the ARM directives:
they don't seem to allow push and pop as values, but they don't preclude
resetting the value somewhere within the assembler file either.