aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/lib/string.S
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2016-05-25 18:38:13 -0400
committerMichael Ellerman <mpe@ellerman.id.au>2016-06-13 23:58:25 -0400
commit3ece16632b64120df2ef566ce32afbdb4aa8af1e (patch)
treefc172067ee4d42a71fd8ec68babd9c4ab00028de /arch/powerpc/lib/string.S
parentd96f234f47aff593538f9e3d674967078f56bc28 (diff)
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 @@
16 PPC_LONG_ALIGN 16 PPC_LONG_ALIGN
17 .text 17 .text
18 18
19_GLOBAL(strcpy)
20 addi r5,r3,-1
21 addi r4,r4,-1
221: lbzu r0,1(r4)
23 cmpwi 0,r0,0
24 stbu r0,1(r5)
25 bne 1b
26 blr
27
28/* This clears out any unused part of the destination buffer, 19/* This clears out any unused part of the destination buffer,
29 just as the libc version does. -- paulus */ 20 just as the libc version does. -- paulus */
30_GLOBAL(strncpy) 21_GLOBAL(strncpy)
@@ -45,30 +36,6 @@ _GLOBAL(strncpy)
45 bdnz 2b 36 bdnz 2b
46 blr 37 blr
47 38
48_GLOBAL(strcat)
49 addi r5,r3,-1
50 addi r4,r4,-1
511: lbzu r0,1(r5)
52 cmpwi 0,r0,0
53 bne 1b
54 addi r5,r5,-1
551: lbzu r0,1(r4)
56 cmpwi 0,r0,0
57 stbu r0,1(r5)
58 bne 1b
59 blr
60
61_GLOBAL(strcmp)
62 addi r5,r3,-1
63 addi r4,r4,-1
641: lbzu r3,1(r5)
65 cmpwi 1,r3,0
66 lbzu r0,1(r4)
67 subf. r3,r0,r3
68 beqlr 1
69 beq 1b
70 blr
71
72_GLOBAL(strncmp) 39_GLOBAL(strncmp)
73 PPC_LCMPI 0,r5,0 40 PPC_LCMPI 0,r5,0
74 beq- 2f 41 beq- 2f
@@ -85,14 +52,6 @@ _GLOBAL(strncmp)
852: li r3,0 522: li r3,0
86 blr 53 blr
87 54
88_GLOBAL(strlen)
89 addi r4,r3,-1
901: lbzu r0,1(r4)
91 cmpwi 0,r0,0
92 bne 1b
93 subf r3,r3,r4
94 blr
95
96#ifdef CONFIG_PPC32 55#ifdef CONFIG_PPC32
97_GLOBAL(memcmp) 56_GLOBAL(memcmp)
98 PPC_LCMPI 0,r5,0 57 PPC_LCMPI 0,r5,0