[llvm-dev] compler-rt, __aeabi_memcpy () possibly broken (ARM)

Renato Golin via llvm-dev llvm-dev at lists.llvm.org
Mon Apr 11 12:58:54 PDT 2016


On 11 April 2016 at 20:01, Peter Jakubek <pjak at gmx.de> wrote:
> No, this is *not* standard AAPCS. "integer core registers" makes the
> difference here! It is rather the base standard AAPCS in ARM's nomenclature.

Hi Peter,

I replied to Tim earlier today, you are correct. AAPCS protects some,
not all D registers.

For some reason, I assumed AAPCS would protect them all, and AAPCS_VFP
would allow you to scratch D0~D7. My bad.


> As long as we can guarantee this is always the case, there won't be a
> problem with LLVM, compiler-rt. Can we guarantee?

I don't think we can (nor should) guarantee this, but we can keep it
that way until whatever fix is accepted across all platforms.


> BTW, newlib's memcpy () is an example that corrupts float registers. So we
> can't assume these do not exist.

I didn't assume they don't exist, just that they wouldn't break the
current (bad) model.

It seems that my assumption that systems used them is outdated by at
least 2 years. Also, with Vinicius patch last year, we made sure that
they're no longer needed. So I think the proposal to remove them is
looking more and more attractive.

Maybe Anton could comment on why he added, so we can extend our search
for whomever is using and fix it in the source.

cheers,
--renato


More information about the llvm-dev mailing list