[PATCH] D38050: [ARM] Use correct calling convention for libm.

Saleem Abdulrasool via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 20 15:12:14 PDT 2017


compnerd added a comment.

@peter.smith the reason that the complexity exists currently is interoperability with gcc.  If the triple is not `hf`, libgcc does not use `AAPCS_VFP_CC`.  This is the source of the problem.  Your mapping is correct though:

- RTABI §4.1.2 functions **must** use `AAPCS_VFP`
- builtins (excluding RTABI §4.1.2 symbols) use `AAPCS_VFP_CC` if the target environment is `hf`, `AAPCS_CC` otherwise
- all remaining functions are determined based on `-mfloat-abi=`.

I believe the triple convention differences impact the CC for libgcc on the various targets as well.  It just is that it is usually statically linked so people don't realize the difference.


Repository:
  rL LLVM

https://reviews.llvm.org/D38050





More information about the llvm-commits mailing list