This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] i586: Use a jump table in strcpy.S {BZ #22353]
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Florian Weimer <fweimer at redhat dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Mon, 30 Oct 2017 06:12:24 -0700
- Subject: Re: [PATCH] i586: Use a jump table in strcpy.S {BZ #22353]
- Authentication-results: sourceware.org; auth=none
- References: <20171027210714.GA15539@gmail.com> <f23c9ac7-4795-b989-276b-940d8974237a@redhat.com>
On Mon, Oct 30, 2017 at 4:18 AM, Florian Weimer <fweimer@redhat.com> wrote:
> On 10/27/2017 11:07 PM, H.J. Lu wrote:
>>
>> This may fail if there are instruction changes before L(1):. This patch
>> replaces it with a jump table which works with any instruction changes.
>
>
> I think you should say instruction *length* changes.
Done. The updated patch is at
https://sourceware.org/git/?p=glibc.git;a=patch;h=9a89973274f901f4c3313e6e2b84d6b2108c7924
> What's the performance impact of the change? Is it even worth to use a jump
> table here?
>
I added 2 strcpy implementations to hjl/pr22353/master. Jump table is faster
than other non-SSE strcpy implementations because it can copy up to 4 bytes
at a time.
--
H.J.