aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorJosh Boyer <jwboyer@linux.vnet.ibm.com>2008-04-21 20:50:27 -0400
committerPaul Mackerras <paulus@samba.org>2008-04-24 06:57:34 -0400
commit96f1bb8a412aec3fc16306ef07c5bdb426edb615 (patch)
treece6e6323720c36bd54eb34b7bb886c8b1ebbd050 /arch
parente91d7119ba8031f57cee5814e31c893487844011 (diff)
[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')
-rw-r--r--arch/ppc/kernel/ppc_ksyms.c1
-rw-r--r--arch/ppc/lib/string.S14
2 files changed, 15 insertions, 0 deletions
diff --git a/arch/ppc/kernel/ppc_ksyms.c b/arch/ppc/kernel/ppc_ksyms.c
index 2ba659f401be..d9036ef0b658 100644
--- a/arch/ppc/kernel/ppc_ksyms.c
+++ b/arch/ppc/kernel/ppc_ksyms.c
@@ -88,6 +88,7 @@ EXPORT_SYMBOL(strncpy);
88EXPORT_SYMBOL(strcat); 88EXPORT_SYMBOL(strcat);
89EXPORT_SYMBOL(strlen); 89EXPORT_SYMBOL(strlen);
90EXPORT_SYMBOL(strcmp); 90EXPORT_SYMBOL(strcmp);
91EXPORT_SYMBOL(strncmp);
91 92
92EXPORT_SYMBOL(csum_partial); 93EXPORT_SYMBOL(csum_partial);
93EXPORT_SYMBOL(csum_partial_copy_generic); 94EXPORT_SYMBOL(csum_partial_copy_generic);
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)
121 beq 1b 121 beq 1b
122 blr 122 blr
123 123
124_GLOBAL(strncmp)
125 PPC_LCMPI r5,0
126 beqlr
127 mtctr r5
128 addi r5,r3,-1
129 addi r4,r4,-1
1301: lbzu r3,1(r5)
131 cmpwi 1,r3,0
132 lbzu r0,1(r4)
133 subf. r3,r0,r3
134 beqlr 1
135 bdnzt eq,1b
136 blr
137
124_GLOBAL(strlen) 138_GLOBAL(strlen)
125 addi r4,r3,-1 139 addi r4,r3,-1
1261: lbzu r0,1(r4) 1401: lbzu r0,1(r4)