[PATCH] powerpc: Add optimized strcspn for P8
Tulio Magno Quites Machado Filho
tuliom@linux.vnet.ibm.com
Wed Apr 20 20:23:00 GMT 2016
"Paul E. Murphy" <murphyp@linux.vnet.ibm.com> writes:
> diff --git a/sysdeps/powerpc/powerpc64/multiarch/strcspn-power8.S b/sysdeps/powerpc/powerpc64/multiarch/strcspn-power8.S
> new file mode 100644
> index 0000000..5da5a77
> --- /dev/null
> +++ b/sysdeps/powerpc/powerpc64/multiarch/strcspn-power8.S
> @@ -0,0 +1,40 @@
> +/* Optimized strcspn implementation for POWER8.
>...
> +#undef EALIGN
> +#define EALIGN(name, alignt, words) \
> + .section ".text"; \
> + ENTRY_2(__strcspn_power8) \
> + .align ALIGNARG(alignt); \
> + EALIGN_W_##words; \
> + BODY_LABEL(__strcspn_power8): \
> + cfi_startproc; \
> + LOCALENTRY(__strcspn_power8)
> +
> +#undef END
> +#define END(name) \
> + cfi_endproc; \
> + TRACEBACK(__strcspn_power8) \
> + END_2(__strcspn_power8)
Can't you replace this block of code by?
#define STRSPN __strcspn_power8
That would require a few more changes to the #ifndef USE_AS_STRCSPN block as
well.
--
Tulio Magno
More information about the Libc-alpha
mailing list