[PATCH] ARM: Fix performance issue in strcpy

Wilco Dijkstra wdijkstr@arm.com
Thu Aug 7 13:40:00 GMT 2014


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?

ChangeLog:
2014-08-07  Wilco Dijkstra <wdijkstr@arm.com>

	* sysdeps/arm/armv6/strcpy.S (strcpy):
	Fix performance issue in misaligned cases.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Fix-performance-issue-in-strcpy.txt
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20140807/dd9f1ba5/attachment.txt>


More information about the Libc-alpha mailing list