diff options
Diffstat (limited to 'arch/powerpc/lib/string.S')
-rw-r--r-- | arch/powerpc/lib/string.S | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/powerpc/lib/string.S b/arch/powerpc/lib/string.S index c4c622d8e6ac..49eb1f1a2bb4 100644 --- a/arch/powerpc/lib/string.S +++ b/arch/powerpc/lib/string.S | |||
@@ -75,6 +75,20 @@ _GLOBAL(strcmp) | |||
75 | beq 1b | 75 | beq 1b |
76 | blr | 76 | blr |
77 | 77 | ||
78 | _GLOBAL(strncmp) | ||
79 | PPC_LCMPI r5,0 | ||
80 | beqlr | ||
81 | mtctr r5 | ||
82 | addi r5,r3,-1 | ||
83 | addi r4,r4,-1 | ||
84 | 1: lbzu r3,1(r5) | ||
85 | cmpwi 1,r3,0 | ||
86 | lbzu r0,1(r4) | ||
87 | subf. r3,r0,r3 | ||
88 | beqlr 1 | ||
89 | bdnzt eq,1b | ||
90 | blr | ||
91 | |||
78 | _GLOBAL(strlen) | 92 | _GLOBAL(strlen) |
79 | addi r4,r3,-1 | 93 | addi r4,r3,-1 |
80 | 1: lbzu r0,1(r4) | 94 | 1: lbzu r0,1(r4) |