提交 96f1bb8a 编写于 作者: J Josh Boyer 提交者: Paul Mackerras

[POWERPC] Add strncmp to arch/ppc

Commit 0119536c 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: NJosh Boyer <jwboyer@linux.vnet.ibm.com>
Signed-off-by: NPaul Mackerras <paulus@samba.org>
上级 e91d7119
......@@ -88,6 +88,7 @@ EXPORT_SYMBOL(strncpy);
EXPORT_SYMBOL(strcat);
EXPORT_SYMBOL(strlen);
EXPORT_SYMBOL(strcmp);
EXPORT_SYMBOL(strncmp);
EXPORT_SYMBOL(csum_partial);
EXPORT_SYMBOL(csum_partial_copy_generic);
......
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册