summaryrefslogtreecommitdiff
path: root/arch/powerpc/lib/string.S
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2016-05-26 01:38:13 +0300
committerMichael Ellerman <mpe@ellerman.id.au>2016-06-14 06:58:25 +0300
commit3ece16632b64120df2ef566ce32afbdb4aa8af1e (patch)
treefc172067ee4d42a71fd8ec68babd9c4ab00028de /arch/powerpc/lib/string.S
parentd96f234f47aff593538f9e3d674967078f56bc28 (diff)
downloadlinux-3ece16632b64120df2ef566ce32afbdb4aa8af1e.tar.xz
powerpc: Remove assembly versions of strcpy, strcat, strlen and strcmp
A number of our assembly implementations of string functions do not align their hot loops. I was going to align them manually, but I realised that they are are almost instruction for instruction identical to what gcc produces, with the advantage that gcc does align them. In light of that, let's just remove the assembly versions. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/lib/string.S')
-rw-r--r--arch/powerpc/lib/string.S41
1 files changed, 0 insertions, 41 deletions
diff --git a/arch/powerpc/lib/string.S b/arch/powerpc/lib/string.S
index c80fb49ce607..a9470567df47 100644
--- a/arch/powerpc/lib/string.S
+++ b/arch/powerpc/lib/string.S
@@ -16,15 +16,6 @@
PPC_LONG_ALIGN
.text
-_GLOBAL(strcpy)
- addi r5,r3,-1
- addi r4,r4,-1
-1: lbzu r0,1(r4)
- cmpwi 0,r0,0
- stbu r0,1(r5)
- bne 1b
- blr
-
/* This clears out any unused part of the destination buffer,
just as the libc version does. -- paulus */
_GLOBAL(strncpy)
@@ -45,30 +36,6 @@ _GLOBAL(strncpy)
bdnz 2b
blr
-_GLOBAL(strcat)
- addi r5,r3,-1
- addi r4,r4,-1
-1: lbzu r0,1(r5)
- cmpwi 0,r0,0
- bne 1b
- addi r5,r5,-1
-1: lbzu r0,1(r4)
- cmpwi 0,r0,0
- stbu r0,1(r5)
- bne 1b
- blr
-
-_GLOBAL(strcmp)
- 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
- beq 1b
- blr
-
_GLOBAL(strncmp)
PPC_LCMPI 0,r5,0
beq- 2f
@@ -85,14 +52,6 @@ _GLOBAL(strncmp)
2: li r3,0
blr
-_GLOBAL(strlen)
- addi r4,r3,-1
-1: lbzu r0,1(r4)
- cmpwi 0,r0,0
- bne 1b
- subf r3,r3,r4
- blr
-
#ifdef CONFIG_PPC32
_GLOBAL(memcmp)
PPC_LCMPI 0,r5,0