[cfe-dev] Bugfixer's question about how C calling convention corresponds to platform CC
Alex Rosenberg
alexr at leftfield.org
Wed Oct 3 02:29:48 PDT 2012
You're looking for ARMABIInfo::computeInfo() in CodeGen/TargetInfo.cpp. ARM has an attribute that looks like __attribute__((pcs("aapcs-vfp"))) that allows you to pick the CC on a per-function basis.
I don't know what "aapcs-linux" is, but it's not one of the CCs from the ARM AAPCS spec last I looked.
Sent from my iPad
On Oct 3, 2012, at 1:42 AM, "David Tweed" <david.tweed at arm.com> wrote:
> Hi, I'm lost in the twisty maze of Tools.cpp and Toolchain.cpp in the course
> of tracking down some regression test issues on ARM. I can see in
> AsmWriter.cpp that an explicit call convention marker, such as ARM_AAPCS
> will be emitted in every case except when the calling convention is C.
> However, my impression is sometimes the C calling convention _is_ a specific
> convention, such as ARM_AAPCS and in that case basic generated function
> calls from clang are marked with a C calling convention. However, I'm
> haven't been able to find the piece of code that implements this
> "knowledge". Could anyone help point it out to me, or is this understanding
> wrong? It looks like FileCheck expects CC markers to appear only when
> explicitly requested and not that the triple-implied ABI CC marker gets
> attached to every generated function: that's what a general user should
> expect of clang as well?
>
> (While I'm asking, I gather that configuration "magic" is basically written
> in response to need from specific users (rather than attempting the mammoth
> task of being complete). In Tools.cpp Clang::AddARMTargetArgs it a "default"
> ABIName of "aapcs-linux" is set for the GNUEABI and GNUEABIHF triples from
> the environment. Does anyone know what the use-case is that motivates that
> is? It'd be useful to know so if the code does get changed I can try to get
> it retested on that platform as well as the ones I've got access to.)
>
> Many thanks for any insight,
> David
>
>
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
More information about the cfe-dev
mailing list