GAS .fpu directive
Peter Bergner
bergner@vnet.ibm.com
Wed Aug 20 19:14:00 GMT 2014
On Wed, 2014-08-20 at 19:02 +0100, Renato Golin wrote:
> On 20 August 2014 17:51, Peter Bergner <bergner@vnet.ibm.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:
https://sourceware.org/binutils/docs-2.24/as/index.html
The powerpc specific doc for .machine [<cpu>|"push"|"pop"] is here:
https://sourceware.org/binutils/docs-2.24/as/PowerPC_002dPseudo.html#PowerPC_002dPseudo
Looking at the ARM directives:
https://sourceware.org/binutils/docs-2.24/as/ARM-Directives.html#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.
Peter
More information about the Binutils
mailing list