alistair23-linux/arch/cris/arch-v32/lib/strcmp.S
Jesper Nilsson 7f2ff23db1 CRISv32: Add arch optimized strcmp.
Add an optimized strcmp for CRISv32. This improves strcmp performance
with about 25% when comparing a 55 character string with itself.

Signed-off-by: Edgar Iglesias <edgar@axis.com>
Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>
2009-06-10 15:21:03 +02:00

22 lines
416 B
ArmAsm

; strcmp.S -- CRISv32 version.
; Copyright (C) 2008 AXIS Communications AB
; Written by Edgar E. Iglesias
;
; This source code is licensed under the GNU General Public License,
; Version 2. See the file COPYING for more details.
.global strcmp
.type strcmp,@function
strcmp:
1:
move.b [$r10+], $r12
seq $r13
sub.b [$r11+], $r12
or.b $r12, $r13
beq 1b
nop
ret
movs.b $r12, $r10
.size strcmp, . - strcmp