[PATCH 3/3] aarch64: Optimized memchr specific to AmpereComputing skylark

Richard Henderson rth@twiddle.net
Fri Oct 12 19:59:00 GMT 2018


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."


r~



More information about the Libc-alpha mailing list