This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] ARM: Fix performance issue in strcpy
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Wilco Dijkstra <wdijkstr at arm dot com>
- Cc: <libc-alpha at sourceware dot org>
- Date: Thu, 7 Aug 2014 14:05:58 +0000
- Subject: Re: [PATCH] ARM: Fix performance issue in strcpy
- Authentication-results: sourceware.org; auth=none
- References: <000501cfb245$2248d600$66da8200$ at com>
On Thu, 7 Aug 2014, Wilco Dijkstra wrote:
> Hi,
>
> This patch fixes a performance bug in strcp. The code dealing with
> unaligned copies uses mvns to detect whether a register is 0. This is
> incorrect - the zero flag is only set if the value is -1. As a result
> the code always does a byte-by-byte copy for the full string rather than
> doing the word-based copy for the misaligned cases. Fixing this more
> than doubles performance.
>
> OK for commit?
OK if this has passed a full glibc testsuite run for at least one
configuration using this code.
--
Joseph S. Myers
joseph@codesourcery.com