This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Calling convention for "Routines for floating point emulation"
- From: Yichao Yu <yyc1992 at gmail dot com>
- To: Joseph Myers <joseph at codesourcery dot com>
- Cc: gcc at gcc dot gnu dot org, Saleem Abdulrasool <compnerd at compnerd dot org>
- Date: Wed, 28 Sep 2016 19:45:59 -0400
- Subject: Re: Calling convention for "Routines for floating point emulation"
- Authentication-results: sourceware.org; auth=none
- References: <CAMvDr+Smo9coOM8Z=-oBkUWBJcCuw8LZupWZzkSdL36aSoz98g@mail.gmail.com> <alpine.DEB.2.20.1609282330420.28673@digraph.polyomino.org.uk>
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