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

Peter Jakubek via llvm-dev llvm-dev at lists.llvm.org
Mon Apr 11 12:16:23 PDT 2016


>
> I'm guessing we haven't got that problem yet because no one uses those
> registers or they save/restore. But this is a potential problem, yes.
>

The reason we probably don't have a problem is that LLVM does not seem to
assume the float registers remain unchanged when it generates a call to
__aeabi_memcpy. Even though it could.

That way it doesn't matter whether memcyp is called (and corrupts these 
registers).

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

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

Cheers,

Peter


More information about the llvm-dev mailing list