Re: [PATCH v3 2/3] string: simplify find_zero_ne_all

Wilco Dijkstra <[email protected]>
Newsgroups gmane.comp.lib.glibc.alpha
Message-ID <PAWPR08MB8982546520BF5D7583CFAC8F83A72@PAWPR08MB8982.eurprd08.prod.outlook.com>
Hi Matt,

> Build the mask from the raw difference, as find_ne_all () now does.
> index_first () and index_last () only need to know which byte holds the
> first or the last set bit, and find_zero_all () marks only the bytes that
> were zero, so each term of the or marks only its own bytes.
>
> That drops one of the two carry chains from strcmp () and strncmp () on
> targets using the generic string-fza.h, and one of the two uqsub8 on
> armv6t2.  As in find_ne_all (), only the generic implementation tests
> HAVE_BITOPTS_WORKING.
>
> powerpc keeps its existing form, where orc folds the complement of cmpb
> into the or and the raw difference saves nothing.  alpha and riscv do not
> reach this code with the generic index_first ().

LGTM

Reviewed-by: Wilco Dijkstra  <[email protected]>

Cheers,
Wilco
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.