This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH 3/3] aarch64: Optimized memchr specific to AmpereComputing skylark
If we don't have a test for it, please add one along with patch submission.
On 15/10/2018 00:20, Xue Feng wrote:
> Yes, I missed one situation. If the next block is just the start of a new page with no access, this load will cause a segfault.
> From: Richard Henderson <firstname.lastname@example.org> on behalf of Richard Henderson <email@example.com>
> Sent: Saturday, October 13, 2018 0:18
> To: Xue Feng; firstname.lastname@example.org
> Cc: email@example.com; firstname.lastname@example.org; Feng Xue
> Subject: Re: [PATCH 3/3] aarch64: Optimized memchr specific to AmpereComputing skylark
> On 10/12/18 4:44 AM, Xue Feng wrote:
> > +L(loop):
> > + /*
> > + * Preload the next 16-byte aligned block to hide some memory
> > + * access latency.
> > + */
> > + ldp data1, data2, [src, 16]!
> You seem to be under the mistaken impression that you are allowed to search all
> cntin bytes. However, memchr "shall behave as if it reads the characters
> sequentially and stops as soon as a matching character is found."