GAS .fpu directive

Matt Thomas matt@3am-software.com
Wed Aug 27 00:55:00 GMT 2014


On Aug 21, 2014, at 2:02 AM, Matthew Fortune <Matthew.Fortune@imgtec.com> wrote:

> FWIW given that behaviour my suggestion would be that for .fpu you would
> want to enforce just one .fpu directive and that should precede all code.
> I guess that might break some existing code though but I'd say that is a
> good thing.

I don't know if I can agree with that.

You could have something

.fpu neon
<function neon>

.fpu vfp2
<function vfp2>

and then the caller decides what routine to call depending on the presence
of neon or not (GNU IFUNC per chance).  Same could be said for pre-r6 mips 
code and mipsr6 mips code.  Forcing them to be separate files seems harsh.

I would except the attributes emitted to first match the -mfpu=xxx
option passed to gas, then the first .fpu directive encountered.

Forcing them to be in the "header" makes cpp-processed assembly 
more painful than it should be.



More information about the Binutils mailing list