Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 91508
b: refs/heads/master
c: 0119536
h: refs/heads/master
v: v3
  • Loading branch information
Steven Rostedt authored and Paul Mackerras committed Apr 7, 2008
1 parent e2871fe commit 98c168d
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4df4441e418c809f263939b9f371b67aca28a280
refs/heads/master: 0119536cd314ef95553604208c25bc35581f7f0a
1 change: 1 addition & 0 deletions trunk/arch/powerpc/kernel/ppc_ksyms.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,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);
Expand Down
14 changes: 14 additions & 0 deletions trunk/arch/powerpc/lib/string.S
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,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)
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/asm-powerpc/string.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#define __HAVE_ARCH_STRNCPY
#define __HAVE_ARCH_STRLEN
#define __HAVE_ARCH_STRCMP
#define __HAVE_ARCH_STRNCMP
#define __HAVE_ARCH_STRCAT
#define __HAVE_ARCH_MEMSET
#define __HAVE_ARCH_MEMCPY
Expand All @@ -18,6 +19,7 @@ extern char * strcpy(char *,const char *);
extern char * strncpy(char *,const char *, __kernel_size_t);
extern __kernel_size_t strlen(const char *);
extern int strcmp(const char *,const char *);
extern int strncmp(const char *, const char *, __kernel_size_t);
extern char * strcat(char *, const char *);
extern void * memset(void *,int,__kernel_size_t);
extern void * memcpy(void *,const void *,__kernel_size_t);
Expand Down

0 comments on commit 98c168d

Please sign in to comment.