[Linaro-dev] Discussion on new ARM hard-float port on debian-arm@

Ramana Radhakrishnan ramana.radhakrishnan at arm.com
Tue Jul 13 09:53:28 BST 2010


On Mon, 2010-07-12 at 13:36 -0700, Mark Mitchell wrote:
> Scott Bambrough wrote:
> 
> >>> 2. Use ABI tagging (high effort, involving modifications to affected
> >>> projects - permits hardvfp ABI for explicitly selected functions)
> 
> >>  This is the first time I hear this suggested, and it's quite a nice
> >>  option
> 
> You will definitely need a source attribute to indicate what ABI a
> function has.  As Scott says, the compiler can then call it
> appropriately.  The issue about pointers-to-functions isn't insoluble;
> the attribute becomes part of the function type to a pointer to that
> function has type "pointer-to-hard-float-function", and the compiler can
> warn if you cast that away.

Isn't the source attribute and the relevant bits for the calling
convention already implemented as a part of the hard float ABI work ?

 It's documented here 

http://gcc.gnu.org/onlinedocs/gcc-4.5.0/gcc/Function-Attributes.html#Function-Attributes

I've pasted the relevant text at the end of the mail but not sure about
the warnings...


cheers
Ramana


[1] pcs
        The pcs attribute can be used to control the calling convention
        used for a function on ARM. The attribute takes an argument that
        specifies the calling convention to use. 
        
        When compiling using the AAPCS ABI (or a variant of that) then
        valid values for the argument are "aapcs" and "aapcs-vfp". In
        order to use a variant other than "aapcs" then the compiler must
        be permitted to use the appropriate co-processor registers
        (i.e., the VFP registers must be available in order to use
        "aapcs-vfp"). For example, 
        
        /* Argument passed in r0, and result returned in r0+r1.  */
                  double f2d (float) __attribute__((pcs("aapcs")));
             
        
        Variadic functions always use the "aapcs" calling convention and
        the compiler will reject attempts to specify an alternative. 





More information about the Linaro-dev mailing list