diff options
author | David Howells <dhowells@redhat.com> | 2006-01-08 04:01:17 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-08 23:13:36 -0500 |
commit | 2fa9e7e2dce6aafecc1890461bdc00d78897be8b (patch) | |
tree | ea17c2801b5f9b59027641cb1aebc87d83397363 /arch/frv/lib/atomic-ops.S | |
parent | 2919b51075b3906c2f476e5a932244af1947bf80 (diff) |
[PATCH] frv: drop 8/16-bit xchg and cmpxchg
Drop support for 8-bit and 16-bit xchg and cmpxchg emulation and implements
32-bit xchg with the SWAP/SWAPI instruction.
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/frv/lib/atomic-ops.S')
-rw-r--r-- | arch/frv/lib/atomic-ops.S | 92 |
1 files changed, 0 insertions, 92 deletions
diff --git a/arch/frv/lib/atomic-ops.S b/arch/frv/lib/atomic-ops.S index b03d510a89e4..545cd325ac57 100644 --- a/arch/frv/lib/atomic-ops.S +++ b/arch/frv/lib/atomic-ops.S | |||
@@ -129,48 +129,6 @@ atomic_sub_return: | |||
129 | 129 | ||
130 | ############################################################################### | 130 | ############################################################################### |
131 | # | 131 | # |
132 | # uint8_t __xchg_8(uint8_t i, uint8_t *v) | ||
133 | # | ||
134 | ############################################################################### | ||
135 | .globl __xchg_8 | ||
136 | .type __xchg_8,@function | ||
137 | __xchg_8: | ||
138 | or.p gr8,gr8,gr10 | ||
139 | 0: | ||
140 | orcc gr0,gr0,gr0,icc3 /* set ICC3.Z */ | ||
141 | ckeq icc3,cc7 | ||
142 | ldub.p @(gr9,gr0),gr8 /* LD.P/ORCR must be atomic */ | ||
143 | orcr cc7,cc7,cc3 /* set CC3 to true */ | ||
144 | cstb.p gr10,@(gr9,gr0) ,cc3,#1 | ||
145 | corcc gr29,gr29,gr0 ,cc3,#1 /* clear ICC3.Z if store happens */ | ||
146 | beq icc3,#0,0b | ||
147 | bralr | ||
148 | |||
149 | .size __xchg_8, .-__xchg_8 | ||
150 | |||
151 | ############################################################################### | ||
152 | # | ||
153 | # uint16_t __xchg_16(uint16_t i, uint16_t *v) | ||
154 | # | ||
155 | ############################################################################### | ||
156 | .globl __xchg_16 | ||
157 | .type __xchg_16,@function | ||
158 | __xchg_16: | ||
159 | or.p gr8,gr8,gr10 | ||
160 | 0: | ||
161 | orcc gr0,gr0,gr0,icc3 /* set ICC3.Z */ | ||
162 | ckeq icc3,cc7 | ||
163 | lduh.p @(gr9,gr0),gr8 /* LD.P/ORCR must be atomic */ | ||
164 | orcr cc7,cc7,cc3 /* set CC3 to true */ | ||
165 | csth.p gr10,@(gr9,gr0) ,cc3,#1 | ||
166 | corcc gr29,gr29,gr0 ,cc3,#1 /* clear ICC3.Z if store happens */ | ||
167 | beq icc3,#0,0b | ||
168 | bralr | ||
169 | |||
170 | .size __xchg_16, .-__xchg_16 | ||
171 | |||
172 | ############################################################################### | ||
173 | # | ||
174 | # uint32_t __xchg_32(uint32_t i, uint32_t *v) | 132 | # uint32_t __xchg_32(uint32_t i, uint32_t *v) |
175 | # | 133 | # |
176 | ############################################################################### | 134 | ############################################################################### |
@@ -192,56 +150,6 @@ __xchg_32: | |||
192 | 150 | ||
193 | ############################################################################### | 151 | ############################################################################### |
194 | # | 152 | # |
195 | # uint8_t __cmpxchg_8(uint8_t *v, uint8_t test, uint8_t new) | ||
196 | # | ||
197 | ############################################################################### | ||
198 | .globl __cmpxchg_8 | ||
199 | .type __cmpxchg_8,@function | ||
200 | __cmpxchg_8: | ||
201 | or.p gr8,gr8,gr11 | ||
202 | 0: | ||
203 | orcc gr0,gr0,gr0,icc3 | ||
204 | ckeq icc3,cc7 | ||
205 | ldub.p @(gr11,gr0),gr8 | ||
206 | orcr cc7,cc7,cc3 | ||
207 | sub gr8,gr9,gr7 | ||
208 | sllicc gr7,#24,gr0,icc0 | ||
209 | bne icc0,#0,1f | ||
210 | cstb.p gr10,@(gr11,gr0) ,cc3,#1 | ||
211 | corcc gr29,gr29,gr0 ,cc3,#1 | ||
212 | beq icc3,#0,0b | ||
213 | 1: | ||
214 | bralr | ||
215 | |||
216 | .size __cmpxchg_8, .-__cmpxchg_8 | ||
217 | |||
218 | ############################################################################### | ||
219 | # | ||
220 | # uint16_t __cmpxchg_16(uint16_t *v, uint16_t test, uint16_t new) | ||
221 | # | ||
222 | ############################################################################### | ||
223 | .globl __cmpxchg_16 | ||
224 | .type __cmpxchg_16,@function | ||
225 | __cmpxchg_16: | ||
226 | or.p gr8,gr8,gr11 | ||
227 | 0: | ||
228 | orcc gr0,gr0,gr0,icc3 | ||
229 | ckeq icc3,cc7 | ||
230 | lduh.p @(gr11,gr0),gr8 | ||
231 | orcr cc7,cc7,cc3 | ||
232 | sub gr8,gr9,gr7 | ||
233 | sllicc gr7,#16,gr0,icc0 | ||
234 | bne icc0,#0,1f | ||
235 | csth.p gr10,@(gr11,gr0) ,cc3,#1 | ||
236 | corcc gr29,gr29,gr0 ,cc3,#1 | ||
237 | beq icc3,#0,0b | ||
238 | 1: | ||
239 | bralr | ||
240 | |||
241 | .size __cmpxchg_16, .-__cmpxchg_16 | ||
242 | |||
243 | ############################################################################### | ||
244 | # | ||
245 | # uint32_t __cmpxchg_32(uint32_t *v, uint32_t test, uint32_t new) | 153 | # uint32_t __cmpxchg_32(uint32_t *v, uint32_t test, uint32_t new) |
246 | # | 154 | # |
247 | ############################################################################### | 155 | ############################################################################### |