diff options
author | Josh Boyer <jwboyer@linux.vnet.ibm.com> | 2008-04-22 10:50:27 +1000 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-04-24 20:57:34 +1000 |
commit | 96f1bb8a412aec3fc16306ef07c5bdb426edb615 (patch) | |
tree | ce6e6323720c36bd54eb34b7bb886c8b1ebbd050 /arch/ppc/lib/string.S | |
parent | e91d7119ba8031f57cee5814e31c893487844011 (diff) | |
download | talos-op-linux-96f1bb8a412aec3fc16306ef07c5bdb426edb615.tar.gz talos-op-linux-96f1bb8a412aec3fc16306ef07c5bdb426edb615.zip |
[POWERPC] Add strncmp to arch/ppc
Commit 0119536cd314ef95553604208c25bc35581f7f0a added an assembly
version of strncmp to PowerPC. However, it changed a common header
file between arch/ppc and arch/powerpc without adding strncmp to
arch/ppc. This fixes that omission so that arch/ppc links again.
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/ppc/lib/string.S')
-rw-r--r-- | arch/ppc/lib/string.S | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/ppc/lib/string.S b/arch/ppc/lib/string.S index 84ed33ab4c2d..927253bfc826 100644 --- a/arch/ppc/lib/string.S +++ b/arch/ppc/lib/string.S @@ -121,6 +121,20 @@ _GLOBAL(strcmp) beq 1b blr +_GLOBAL(strncmp) + PPC_LCMPI r5,0 + beqlr + mtctr r5 + addi r5,r3,-1 + addi r4,r4,-1 +1: lbzu r3,1(r5) + cmpwi 1,r3,0 + lbzu r0,1(r4) + subf. r3,r0,r3 + beqlr 1 + bdnzt eq,1b + blr + _GLOBAL(strlen) addi r4,r3,-1 1: lbzu r0,1(r4) |