From: "H.J. Lu" <hjl.tools@gmail.com>
To: "Pawar, Amit" <Amit.Pawar@amd.com>
Cc: "libc-alpha@sourceware.org" <libc-alpha@sourceware.org>
Subject: Re: [PATCH x86_64] Update memcpy, mempcpy and memmove selection order for Excavator CPU BZ #19583
Date: Fri, 18 Mar 2016 14:45:00 -0000 [thread overview]
Message-ID: <CAMe9rOr11s9j7i4Gk2yozXY-MWJLKpFXCKkFqoLW553tyJ4LZg@mail.gmail.com> (raw)
In-Reply-To: <CAMe9rOqpbUF2m40pxjyr+O8pSrA9EmUgNsOcBPuP-wDaMqn+RQ@mail.gmail.com>
On Fri, Mar 18, 2016 at 6:51 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Fri, Mar 18, 2016 at 6:22 AM, Pawar, Amit <Amit.Pawar@amd.com> wrote:
>>>No, it isn't fixed. Avoid_AVX_Fast_Unaligned_Load should disable __memcpy_avx_unaligned and nothing more. Also you need to fix ALL selections.
>>
>> diff --git a/sysdeps/x86_64/multiarch/memcpy.S b/sysdeps/x86_64/multiarch/memcpy.S
>> index 8882590..a5afaf4 100644
>> --- a/sysdeps/x86_64/multiarch/memcpy.S
>> +++ b/sysdeps/x86_64/multiarch/memcpy.S
>> @@ -39,6 +39,8 @@ ENTRY(__new_memcpy)
>> ret
>> #endif
>> 1: lea __memcpy_avx_unaligned(%rip), %RAX_LP
>> + HAS_ARCH_FEATURE (Avoid_AVX_Fast_Unaligned_Load)
>> + jnz 3f
>> HAS_ARCH_FEATURE (AVX_Fast_Unaligned_Load)
>> jnz 2f
>> lea __memcpy_sse2_unaligned(%rip), %RAX_LP
>> @@ -52,6 +54,8 @@ ENTRY(__new_memcpy)
>> jnz 2f
>> lea __memcpy_ssse3(%rip), %RAX_LP
>> 2: ret
>> +3: lea __memcpy_ssse3(%rip), %RAX_LP
>> + ret
>> END(__new_memcpy)
>>
>> # undef ENTRY
>>
>> Will update all IFUNC's if this ok else please suggest.
>>
>
> Better, but not OK. Try something like
>
> iff --git a/sysdeps/x86_64/multiarch/memcpy.S
> b/sysdeps/x86_64/multiarch/memcpy.S
> index ab5998c..2abe2fd 100644
> --- a/sysdeps/x86_64/multiarch/memcpy.S
> +++ b/sysdeps/x86_64/multiarch/memcpy.S
> @@ -42,9 +42,11 @@ ENTRY(__new_memcpy)
> ret
> #endif
> 1: lea __memcpy_avx_unaligned(%rip), %RAX_LP
> + HAS_ARCH_FEATURE (Avoid_AVX_Fast_Unaligned_Load)
> + jnz 3f
> HAS_ARCH_FEATURE (AVX_Fast_Unaligned_Load)
> jnz 2f
> - lea __memcpy_sse2_unaligned(%rip), %RAX_LP
> +3: lea __memcpy_sse2_unaligned(%rip), %RAX_LP
> HAS_ARCH_FEATURE (Fast_Unaligned_Load)
> jnz 2f
> lea __memcpy_sse2(%rip), %RAX_LP
>
One question. If you don't want __memcpy_avx_unaligned,
why do you set AVX_Fast_Unaligned_Load?
--
H.J.
next prev parent reply other threads:[~2016-03-18 14:45 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-17 10:52 Pawar, Amit
2016-03-17 11:53 ` H.J. Lu
2016-03-17 14:16 ` Pawar, Amit
2016-03-17 14:46 ` H.J. Lu
2016-03-18 11:43 ` Pawar, Amit
2016-03-18 11:51 ` H.J. Lu
2016-03-18 12:25 ` Pawar, Amit
2016-03-18 12:34 ` H.J. Lu
2016-03-18 13:22 ` Pawar, Amit
2016-03-18 13:51 ` H.J. Lu
2016-03-18 13:55 ` Adhemerval Zanella
2016-03-18 14:43 ` H.J. Lu
2016-03-18 14:45 ` H.J. Lu [this message]
2016-03-18 15:19 ` Pawar, Amit
2016-03-18 15:24 ` H.J. Lu
2016-03-22 11:08 ` Pawar, Amit
2016-03-22 14:50 ` H.J. Lu
2016-03-22 14:57 ` Pawar, Amit
2016-03-22 15:03 ` H.J. Lu
2016-03-23 10:12 ` Pawar, Amit
2016-03-23 17:59 ` H.J. Lu
2016-03-28 7:43 ` Pawar, Amit
2016-03-28 12:12 ` H.J. Lu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAMe9rOr11s9j7i4Gk2yozXY-MWJLKpFXCKkFqoLW553tyJ4LZg@mail.gmail.com \
--to=hjl.tools@gmail.com \
--cc=Amit.Pawar@amd.com \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).