Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Jun 2009 13:15:56 +0000 (UTC)
From:      Stanislav Sedov <stas@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r194585 - head/lib/libc/arm/string
Message-ID:  <200906211315.n5LDFuut007769@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: stas
Date: Sun Jun 21 13:15:56 2009
New Revision: 194585
URL: http://svn.freebsd.org/changeset/base/194585

Log:
  - Eliminate extra subcs instruction.  I have not noticed before that we
    always perform substraction now, so no instruction could be rordered
    to eliminate the conditional substraction.

Modified:
  head/lib/libc/arm/string/strncmp.S

Modified: head/lib/libc/arm/string/strncmp.S
==============================================================================
--- head/lib/libc/arm/string/strncmp.S	Sun Jun 21 13:13:13 2009	(r194584)
+++ head/lib/libc/arm/string/strncmp.S	Sun Jun 21 13:15:56 2009	(r194585)
@@ -40,10 +40,9 @@ ENTRY(strncmp)
 
 /* ip == last src address to compare */
 	adds	ip, r0, r2
-	sub	ip, ip, #1
 /* Use last possible address on overflow. */
 	movcs	ip, #0
-	subcs	ip, ip, #1
+	sub	ip, ip, #1
 1:
 	ldrb	r2, [r0], #1
 	ldrb	r3, [r1], #1



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906211315.n5LDFuut007769>