This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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: [PATCH] aarch64: optimize the unaligned case of memcmp


Sebastian Pop wrote:
> On 06/23/2017 04:28 PM, Wilco Dijkstra wrote:
>
> > Where is the setup of limit_wd and limit???
>
> You are right, my patch was not quite correct: I was missing the 
> initialization of limit_wd, like so:
>
> lsr     limit_wd, limit, #3
>
> limit is the number of bytes to be compared passed in as a parameter to 
> memcmp.

You're still missing the setting of limit. Your current version will do the
words up to limit - (limit & 7), and then do byte by byte using the original
value of limit, so it's going well outside its bounds...

Wilco

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