This is the mail archive of the mailing list for the newlib project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Support __aeabi_memcpy, __aeabi_memcpy4 and __aeabi_memcpy8 routines in the arm backend.

On Fri, Aug 8, 2014 at 6:26 PM, Bin.Cheng <> wrote:
> On Fri, Aug 8, 2014 at 6:19 PM, Richard Earnshaw <> wrote:
>> I've two concerns about this, one important.
>> 1) Minor concern.  The point of __aeabi_memcpy[4|8] is that they are
>> more efficient than __aeabi_memcpy since they know the aligment and size
>> are a multiple of 4/8 respectively.
>> 2) Major concern.  __aeabi_memcpy* are not permitted to clobber any
>> callee clobbered registers outside of the core register set
>> (specifically not to clobber any FP/SIMD registers).  Unfortunately, the
>> memcpy in newlib does not guarantee this, particularly for ARMv7-a.  You
>> need to either provide alternative implementations in that case, or to
>> save the appropriate FP/SIMD registers around a call to memcpy.
> Ah, they are conflict with each other in ABI level.  If __aeabi_memcpy
> could be alias to c version memcpy, how could it reserve registers
> other than AAPCS allows?
I think what ABI says is that they can be aliased if it is known the C
memcpy does not clobber other registers, otherwise cannot.

- Joey

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]