This is the mail archive of the
mailing list for the GCC project.
Calling convention for "Routines for floating point emulation"
- From: Yichao Yu <yyc1992 at gmail dot com>
- To: gcc at gcc dot gnu dot org
- Cc: compnerd at compnerd dot org
- Date: Wed, 28 Sep 2016 17:23:45 -0400
- Subject: Calling convention for "Routines for floating point emulation"
- Authentication-results: sourceware.org; auth=none
I'd like to ask what should be the calling convention/ABI for these
routines on platforms with hardware floating point support (but
somehow still want to generate a libcall for whatever reasons).
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.
A breif google search doesn't show document supporting either so what
exactly should be used? Is it documented anywhere or what's the
default rule to decide the calling conventions for these functions? In
either case I think it's be nice if the document is a little more
explicit about this.