[llvm] r280833 - CodeGen: ensure that libcalls are always AAPCS CC

Saleem Abdulrasool via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 9 13:21:32 PDT 2016


On Wed, Sep 7, 2016 at 11:14 AM, Anton Korobeynikov <anton at korobeynikov.info
> wrote:

> > -/// InitLibcallCallingConvs - Set default libcall CallingConvs.
> > -///
> > -static void InitLibcallCallingConvs(CallingConv::ID *CCs) {
> > -  for (int i = 0; i < RTLIB::UNKNOWN_LIBCALL; ++i) {
> > -    CCs[i] = CallingConv::C;
> > -  }
> > +/// Set default libcall CallingConvs.
> > +static void InitLibcallCallingConvs(CallingConv::ID *CCs, const Triple
> &T) {
> > +  for (int LC = 0; LC < RTLIB::UNKNOWN_LIBCALL; ++LC)
> > +    CCs[LC] = CallingConv::C;
> > +
> > +  // The builtins on ARM always use AAPCS, irrespective of wheter C is
> AAPCS or
> > +  // AAPCS_VFP.
> > +  if (T.getArch() == Triple::arm || T.getArch() == Triple::thumb)
> That's gross hack in the generic target lowering code... Why can't you
> initialize the CC from the backend?


Yeah, I agree.  This was just a complete oversight on my part.  Addressed
in SVN r281088.

Thanks for pointing this out!


>
> --
> With best regards, Anton Korobeynikov
> Department of Statistical Modelling, Saint Petersburg State University
>



-- 
Saleem Abdulrasool
compnerd (at) compnerd (dot) org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160909/45164cd0/attachment.html>


More information about the llvm-commits mailing list