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: [PATCHv2] powerpc: refactor strrchr IFUNC


Rajalakshmi Srinivasaraghavan <raji@linux.vnet.ibm.com> writes:

> As done in commit 6d15a5c2e9450a1e926d5b4991759e1cfa50fccf
> clean up IFUNC implementation for power8 in order to remove
> unneeded macro definitions.
>
> 2017-06-21  Rajalakshmi Srinivasaraghavan  <raji@linux.vnet.ibm.com>
>
> 	* sysdeps/powerpc/powerpc64/multiarch/strchr-power8.S(STRRCHR): Define
> 	the implementation-specific function name and remove unneeded macros
> 	definition.
> 	* sysdeps/powerpc/powerpc64/power8/strrchr.S(STRRCHR): Set a default
> 	function name if not defined and pass as parameter to macros
> 	accordingly.

OK

> diff --git a/sysdeps/powerpc/powerpc64/power8/strrchr.S b/sysdeps/powerpc/powerpc64/power8/strrchr.S
> index 0ba6138..0c7c900 100644
> --- a/sysdeps/powerpc/powerpc64/power8/strrchr.S
> +++ b/sysdeps/powerpc/powerpc64/power8/strrchr.S
> @@ -76,8 +76,12 @@
>  1: \
>  	vsumsws	v2, v2, v0;
>  #endif	/* !__LITTLE_ENDIAN__  */
> +
> +#ifndef STRRCHR
> +# define STRRCHR strrchr
> +#endif
>  	.machine  power7
> -ENTRY_TOCLESS (strrchr)
> +ENTRY_TOCLESS (STRRCHR)
>  	CALL_MCOUNT 2
>  	dcbt	0,r3
>  	clrrdi	r8,r3,3	      /* Align the address to doubleword boundary.  */
> @@ -459,6 +463,6 @@ L(continue1):
>  #endif
>  	add	r3, r3, r6      /* Compute final length.  */
>  	blr
> -END (strrchr)
> +END (STRRCHR)

Shouldn't it be END_GEN_TB (STRRCHR, TB_TOCLESS)  ?

Looks good to me with that change.

-- 
Tulio Magno


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