[llvm-commits] [patch] Update llvm-gcc to produce "" for the default calling convention on ARM

Rafael Espindola espindola at google.com
Thu Jun 17 07:01:02 PDT 2010


> If I read PR7357 correctly, then you're relying on the CC being "".
> That means you're really just disabling simplify-libcalls on an
> AAPCS-VFP platform.

In a AAPCS-VFP platform, when do we need to mark a function with
arm_aapcs_vfpcc? The only difference is that floats are passed on the
hard registers, right? So maybe the correct behavior is to just take
this patch a bit further and have in a AAPCS-VFP platform:

*) no -mabi or -mfloat-abi -> ""
*) -mabi=aapcs -> ""
*) -mabi=apcs-gnu -> arm_apcscc
*) -mabi=aapcss -mfloat-abi=soft -> arm_aapcscc

In other words, the default for a platform that uses AAPCS-VFP by
default would be aapcs-vfp and you could just use "" as the calling
convention for that.

Note that right now the patch has disabled simplify libcalls for
aapcs-vfp, but that is actually a bug fix, since it was producing code
that had undefined behavior (calling a function with one CC using
another). AAPCS platform had that bug, and we found it in the very
real case of building SPEC.

What platform uses AAPCS-VFP by default btw?

> deep
>


Cheers,
-- 
Rafael Ávila de Espíndola




More information about the llvm-commits mailing list