Calling convention for "Routines for floating point emulation"

Yichao Yu yyc1992@gmail.com
Wed Sep 28 23:46:00 GMT 2016


On Wed, Sep 28, 2016 at 7:39 PM, Joseph Myers <joseph@codesourcery.com> wrote:
> On Wed, 28 Sep 2016, Yichao Yu wrote:
>
>> In particular, it seems that on all the platforms with a
>> arm*-*-gnueabihf triple I've checked (alarm armv7h, alarm armv6h,
>> debian armhf, fedora armv7hl) the __powidf2 function (and possibly
>> many others) are compiled with the AAPCS VFP calling convention, which
>> is also how it is used by gcc. However, LLVM dev (CC'd) claims that
>> these routines are meant to be always using soft floating point
>> calling convention even on platforms using hard floating point ABI.
>
> The RTABI functions should use the base AAPCS calling conventions.  That
> was something I dealt with when working on the implementation of the VFP
> ABI variant <https://gcc.gnu.org/ml/gcc-patches/2009-05/msg00591.html>.
>
> Except where an external ABI defines things like that, the normal
> expectation for libgcc functions is that they have the same ABI as for an
> ordinary C function with the same prototype.  That is, since libgcc.texi
> gives a prototype for __powidf2 without saying anything special about its
> ABI, and since it is not a function defined in RTABI, it can be taken to

I guess other ppl on the list probably know this but what's the list
of function in RTABI?

Thanks.

> use the VFP ABI when compiling for that ABI.
>
> --
> Joseph S. Myers
> joseph@codesourcery.com



More information about the Gcc mailing list