[Skiboot] [PATCH 05/15] libc/string: Add memcpy_ci

Stewart Smith stewart at linux.vnet.ibm.com
Wed Sep 14 19:06:06 AEST 2016


Claudio Carvalho <cclaudio at linux.vnet.ibm.com> writes:
>> It also (currently) assumes that src is a multiple of uint32_t, although
>> nothing checks that and so would silently fail if called for, say 33 bytes.
>> 
>
> Not sure if I understand your suggestion here.
>
> This function doesn't check if srcpp and dstpp are multiple of uint32_t,
> but it assumes that the processor is able to read a char and a uint32_t
> from src. Thus, the first loop copies at most len % sizeof(uint32_t) to
> optimize the number of reads

I was wrong is what it was :)

I blame a flashback to inefficient unaligned access code.

-- 
Stewart Smith
OPAL Architect, IBM.



More information about the Skiboot mailing list