aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2005-10-27 04:03:58 -0400
committerStephen Rothwell <sfr@canb.auug.org.au>2005-10-27 22:54:35 -0400
commit299f6ce491aa28515d86f29af2779cbfdc7a4790 (patch)
treeeb748a66cdff8b59d28f40266af9049d3425651a /arch
parenta4a264f144d5389a52d467a7e41bec2834cfde75 (diff)
ppc64: use mem_64.S from powerpc/lib
and remove the same bits from ppc64/lib/string.S. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/lib/Makefile3
-rw-r--r--arch/ppc64/lib/string.S106
2 files changed, 1 insertions, 108 deletions
diff --git a/arch/powerpc/lib/Makefile b/arch/powerpc/lib/Makefile
index 15b6b2696500..0115bf96751c 100644
--- a/arch/powerpc/lib/Makefile
+++ b/arch/powerpc/lib/Makefile
@@ -4,13 +4,12 @@
4 4
5ifeq ($(CONFIG_PPC_MERGE),y) 5ifeq ($(CONFIG_PPC_MERGE),y)
6obj-y := string.o 6obj-y := string.o
7obj-$(CONFIG_PPC64) += mem_64.o
8endif 7endif
9 8
10obj-y += strcase.o 9obj-y += strcase.o
11obj-$(CONFIG_PPC32) += div64.o copy_32.o checksum_32.o 10obj-$(CONFIG_PPC32) += div64.o copy_32.o checksum_32.o
12obj-$(CONFIG_PPC64) += checksum_64.o copypage_64.o copyuser_64.o \ 11obj-$(CONFIG_PPC64) += checksum_64.o copypage_64.o copyuser_64.o \
13 memcpy_64.o usercopy_64.o 12 memcpy_64.o usercopy_64.o mem_64.o
14obj-$(CONFIG_PPC_ISERIES) += e2a.o 13obj-$(CONFIG_PPC_ISERIES) += e2a.o
15ifeq ($(CONFIG_PPC64),y) 14ifeq ($(CONFIG_PPC64),y)
16obj-$(CONFIG_SMP) += locks.o 15obj-$(CONFIG_SMP) += locks.o
diff --git a/arch/ppc64/lib/string.S b/arch/ppc64/lib/string.S
index 813587e5c2ec..e21a0038a4d6 100644
--- a/arch/ppc64/lib/string.S
+++ b/arch/ppc64/lib/string.S
@@ -65,112 +65,6 @@ _GLOBAL(strlen)
65 subf r3,r3,r4 65 subf r3,r3,r4
66 blr 66 blr
67 67
68_GLOBAL(memset)
69 neg r0,r3
70 rlwimi r4,r4,8,16,23
71 andi. r0,r0,7 /* # bytes to be 8-byte aligned */
72 rlwimi r4,r4,16,0,15
73 cmplw cr1,r5,r0 /* do we get that far? */
74 rldimi r4,r4,32,0
75 mtcrf 1,r0
76 mr r6,r3
77 blt cr1,8f
78 beq+ 3f /* if already 8-byte aligned */
79 subf r5,r0,r5
80 bf 31,1f
81 stb r4,0(r6)
82 addi r6,r6,1
831: bf 30,2f
84 sth r4,0(r6)
85 addi r6,r6,2
862: bf 29,3f
87 stw r4,0(r6)
88 addi r6,r6,4
893: srdi. r0,r5,6
90 clrldi r5,r5,58
91 mtctr r0
92 beq 5f
934: std r4,0(r6)
94 std r4,8(r6)
95 std r4,16(r6)
96 std r4,24(r6)
97 std r4,32(r6)
98 std r4,40(r6)
99 std r4,48(r6)
100 std r4,56(r6)
101 addi r6,r6,64
102 bdnz 4b
1035: srwi. r0,r5,3
104 clrlwi r5,r5,29
105 mtcrf 1,r0
106 beq 8f
107 bf 29,6f
108 std r4,0(r6)
109 std r4,8(r6)
110 std r4,16(r6)
111 std r4,24(r6)
112 addi r6,r6,32
1136: bf 30,7f
114 std r4,0(r6)
115 std r4,8(r6)
116 addi r6,r6,16
1177: bf 31,8f
118 std r4,0(r6)
119 addi r6,r6,8
1208: cmpwi r5,0
121 mtcrf 1,r5
122 beqlr+
123 bf 29,9f
124 stw r4,0(r6)
125 addi r6,r6,4
1269: bf 30,10f
127 sth r4,0(r6)
128 addi r6,r6,2
12910: bflr 31
130 stb r4,0(r6)
131 blr
132
133_GLOBAL(memmove)
134 cmplw 0,r3,r4
135 bgt .backwards_memcpy
136 b .memcpy
137
138_GLOBAL(backwards_memcpy)
139 rlwinm. r7,r5,32-3,3,31 /* r0 = r5 >> 3 */
140 add r6,r3,r5
141 add r4,r4,r5
142 beq 2f
143 andi. r0,r6,3
144 mtctr r7
145 bne 5f
1461: lwz r7,-4(r4)
147 lwzu r8,-8(r4)
148 stw r7,-4(r6)
149 stwu r8,-8(r6)
150 bdnz 1b
151 andi. r5,r5,7
1522: cmplwi 0,r5,4
153 blt 3f
154 lwzu r0,-4(r4)
155 subi r5,r5,4
156 stwu r0,-4(r6)
1573: cmpwi 0,r5,0
158 beqlr
159 mtctr r5
1604: lbzu r0,-1(r4)
161 stbu r0,-1(r6)
162 bdnz 4b
163 blr
1645: mtctr r0
1656: lbzu r7,-1(r4)
166 stbu r7,-1(r6)
167 bdnz 6b
168 subf r5,r0,r5
169 rlwinm. r7,r5,32-3,3,31
170 beq 2b
171 mtctr r7
172 b 1b
173
174_GLOBAL(memcmp) 68_GLOBAL(memcmp)
175 cmpwi 0,r5,0 69 cmpwi 0,r5,0
176 ble- 2f 70 ble- 2f