aarch64: Call all string function implementations in tests

Message ID 1498157184-23010-1-git-send-email-siddhesh@sourceware.org
State New, archived
Headers

Commit Message

Siddhesh Poyarekar June 22, 2017, 6:46 p.m. UTC
  The string function implementations implemented so far do not use any
instructions that may deviate from standard aarch64, so it is possible
for all routines to run on all armv8 hardware.  Select all
implementations in the benchmarks and tests.

	* sysdeps/aarch64/multiarch/ifunc-impl-list.c
	(__libc_ifunc_impl_list): Unconditionally select thunderx
	routine for testing.
---
 sysdeps/aarch64/multiarch/ifunc-impl-list.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
  

Comments

Siddhesh Poyarekar June 29, 2017, 9:47 a.m. UTC | #1
On Friday 23 June 2017 12:16 AM, Siddhesh Poyarekar wrote:
> The string function implementations implemented so far do not use any
> instructions that may deviate from standard aarch64, so it is possible
> for all routines to run on all armv8 hardware.  Select all
> implementations in the benchmarks and tests.
> 
> 	* sysdeps/aarch64/multiarch/ifunc-impl-list.c
> 	(__libc_ifunc_impl_list): Unconditionally select thunderx
> 	routine for testing.
> ---
>  sysdeps/aarch64/multiarch/ifunc-impl-list.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/sysdeps/aarch64/multiarch/ifunc-impl-list.c b/sysdeps/aarch64/multiarch/ifunc-impl-list.c
> index c4f23df..32056bc 100644
> --- a/sysdeps/aarch64/multiarch/ifunc-impl-list.c
> +++ b/sysdeps/aarch64/multiarch/ifunc-impl-list.c
> @@ -39,12 +39,10 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
>  
>    /* Support sysdeps/aarch64/multiarch/memcpy.c and memmove.c.  */
>    IFUNC_IMPL (i, name, memcpy,
> -	      IFUNC_IMPL_ADD (array, i, memcpy, IS_THUNDERX (midr),
> -			      __memcpy_thunderx)
> +	      IFUNC_IMPL_ADD (array, i, memcpy, 1, __memcpy_thunderx)
>  	      IFUNC_IMPL_ADD (array, i, memcpy, 1, __memcpy_generic))
>    IFUNC_IMPL (i, name, memmove,
> -	      IFUNC_IMPL_ADD (array, i, memmove, IS_THUNDERX (midr),
> -			      __memmove_thunderx)
> +	      IFUNC_IMPL_ADD (array, i, memmove, 1, __memmove_thunderx)
>  	      IFUNC_IMPL_ADD (array, i, memmove, 1, __memmove_generic))
>  
>    return i;
>
  
Siddhesh Poyarekar June 30, 2017, 3:21 p.m. UTC | #2
Hi,

I'll commit this since I noticed that Richard Henderson made the same
suggestion earlier[1].

Siddhesh

[1] https://sourceware.org/ml/libc-alpha/2017-06/msg00978.html

On Thursday 29 June 2017 03:17 PM, Siddhesh Poyarekar wrote:
> On Friday 23 June 2017 12:16 AM, Siddhesh Poyarekar wrote:
>> The string function implementations implemented so far do not use any
>> instructions that may deviate from standard aarch64, so it is possible
>> for all routines to run on all armv8 hardware.  Select all
>> implementations in the benchmarks and tests.
>>
>> 	* sysdeps/aarch64/multiarch/ifunc-impl-list.c
>> 	(__libc_ifunc_impl_list): Unconditionally select thunderx
>> 	routine for testing.
>> ---
>>  sysdeps/aarch64/multiarch/ifunc-impl-list.c | 6 ++----
>>  1 file changed, 2 insertions(+), 4 deletions(-)
>>
>> diff --git a/sysdeps/aarch64/multiarch/ifunc-impl-list.c b/sysdeps/aarch64/multiarch/ifunc-impl-list.c
>> index c4f23df..32056bc 100644
>> --- a/sysdeps/aarch64/multiarch/ifunc-impl-list.c
>> +++ b/sysdeps/aarch64/multiarch/ifunc-impl-list.c
>> @@ -39,12 +39,10 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
>>  
>>    /* Support sysdeps/aarch64/multiarch/memcpy.c and memmove.c.  */
>>    IFUNC_IMPL (i, name, memcpy,
>> -	      IFUNC_IMPL_ADD (array, i, memcpy, IS_THUNDERX (midr),
>> -			      __memcpy_thunderx)
>> +	      IFUNC_IMPL_ADD (array, i, memcpy, 1, __memcpy_thunderx)
>>  	      IFUNC_IMPL_ADD (array, i, memcpy, 1, __memcpy_generic))
>>    IFUNC_IMPL (i, name, memmove,
>> -	      IFUNC_IMPL_ADD (array, i, memmove, IS_THUNDERX (midr),
>> -			      __memmove_thunderx)
>> +	      IFUNC_IMPL_ADD (array, i, memmove, 1, __memmove_thunderx)
>>  	      IFUNC_IMPL_ADD (array, i, memmove, 1, __memmove_generic))
>>  
>>    return i;
>>
>
  
Szabolcs Nagy June 30, 2017, 3:56 p.m. UTC | #3
On 30/06/17 16:21, Siddhesh Poyarekar wrote:
> Hi,
> 
> I'll commit this since I noticed that Richard Henderson made the same
> suggestion earlier[1].
> 
> Siddhesh
> 
> [1] https://sourceware.org/ml/libc-alpha/2017-06/msg00978.html
> 

ok.

> On Thursday 29 June 2017 03:17 PM, Siddhesh Poyarekar wrote:
>> On Friday 23 June 2017 12:16 AM, Siddhesh Poyarekar wrote:
>>> The string function implementations implemented so far do not use any
>>> instructions that may deviate from standard aarch64, so it is possible
>>> for all routines to run on all armv8 hardware.  Select all
>>> implementations in the benchmarks and tests.
>>>
>>> 	* sysdeps/aarch64/multiarch/ifunc-impl-list.c
>>> 	(__libc_ifunc_impl_list): Unconditionally select thunderx
>>> 	routine for testing.
>>> ---
>>>  sysdeps/aarch64/multiarch/ifunc-impl-list.c | 6 ++----
>>>  1 file changed, 2 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/sysdeps/aarch64/multiarch/ifunc-impl-list.c b/sysdeps/aarch64/multiarch/ifunc-impl-list.c
>>> index c4f23df..32056bc 100644
>>> --- a/sysdeps/aarch64/multiarch/ifunc-impl-list.c
>>> +++ b/sysdeps/aarch64/multiarch/ifunc-impl-list.c
>>> @@ -39,12 +39,10 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
>>>  
>>>    /* Support sysdeps/aarch64/multiarch/memcpy.c and memmove.c.  */
>>>    IFUNC_IMPL (i, name, memcpy,
>>> -	      IFUNC_IMPL_ADD (array, i, memcpy, IS_THUNDERX (midr),
>>> -			      __memcpy_thunderx)
>>> +	      IFUNC_IMPL_ADD (array, i, memcpy, 1, __memcpy_thunderx)
>>>  	      IFUNC_IMPL_ADD (array, i, memcpy, 1, __memcpy_generic))
>>>    IFUNC_IMPL (i, name, memmove,
>>> -	      IFUNC_IMPL_ADD (array, i, memmove, IS_THUNDERX (midr),
>>> -			      __memmove_thunderx)
>>> +	      IFUNC_IMPL_ADD (array, i, memmove, 1, __memmove_thunderx)
>>>  	      IFUNC_IMPL_ADD (array, i, memmove, 1, __memmove_generic))
>>>  
>>>    return i;
>>>
>>
>
  

Patch

diff --git a/sysdeps/aarch64/multiarch/ifunc-impl-list.c b/sysdeps/aarch64/multiarch/ifunc-impl-list.c
index c4f23df..32056bc 100644
--- a/sysdeps/aarch64/multiarch/ifunc-impl-list.c
+++ b/sysdeps/aarch64/multiarch/ifunc-impl-list.c
@@ -39,12 +39,10 @@  __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
 
   /* Support sysdeps/aarch64/multiarch/memcpy.c and memmove.c.  */
   IFUNC_IMPL (i, name, memcpy,
-	      IFUNC_IMPL_ADD (array, i, memcpy, IS_THUNDERX (midr),
-			      __memcpy_thunderx)
+	      IFUNC_IMPL_ADD (array, i, memcpy, 1, __memcpy_thunderx)
 	      IFUNC_IMPL_ADD (array, i, memcpy, 1, __memcpy_generic))
   IFUNC_IMPL (i, name, memmove,
-	      IFUNC_IMPL_ADD (array, i, memmove, IS_THUNDERX (midr),
-			      __memmove_thunderx)
+	      IFUNC_IMPL_ADD (array, i, memmove, 1, __memmove_thunderx)
 	      IFUNC_IMPL_ADD (array, i, memmove, 1, __memmove_generic))
 
   return i;