Lines Matching +full:1 +full:w

9  * 1. Redistributions of source code must retain the above copyright
58 __asm__ __volatile__("or 1, 1, 1;" in ck_pr_stall()
101 __asm__ __volatile__(I "%U1%X1 %0, %1" \ in CK_PR_FENCE()
127 __asm__ __volatile__(I "%U0%X0 %1, %0" \
154 __asm__ __volatile__("1:" \
155 "lwarx %0, 0, %1;" \
158 "stwcx. %2, 0, %1;" \
159 "bne- 1b;" \
173 __asm__ __volatile__("1:" \
174 "lwarx %0, 0, %1;" \
177 "stwcx. %2, 0, %1;" \
178 "bne- 1b;" \
197 #define CK_PR_FAS(N, M, T, W) \ argument
202 __asm__ __volatile__("1:" \
203 "l" W "arx %0, 0, %1;" \
204 "st" W "cx. %2, 0, %1;" \
205 "bne- 1b;" \
213 CK_PR_FAS(32, uint32_t, uint32_t, "w")
214 CK_PR_FAS(ptr, void, void *, "w")
215 CK_PR_FAS(int, int, int, "w")
216 CK_PR_FAS(uint, unsigned int, unsigned int, "w")
220 #define CK_PR_UNARY(O, N, M, T, I, W) \ argument
225 __asm__ __volatile__("1:" \
226 "l" W "arx %0, 0, %1;" \
228 "st" W "cx. %0, 0, %1;" \
229 "bne- 1b;" \
236 CK_PR_UNARY(inc, ptr, void, void *, "addic %0, %0, 1", "w")
237 CK_PR_UNARY(dec, ptr, void, void *, "addic %0, %0, -1", "w")
238 CK_PR_UNARY(not, ptr, void, void *, "not %0, %0", "w")
239 CK_PR_UNARY(neg, ptr, void, void *, "neg %0, %0", "w")
241 #define CK_PR_UNARY_S(S, T, W) \ argument
242 CK_PR_UNARY(inc, S, T, T, "addic %0, %0, 1", W) \
243 CK_PR_UNARY(dec, S, T, T, "addic %0, %0, -1", W) \
244 CK_PR_UNARY(not, S, T, T, "not %0, %0", W) \
245 CK_PR_UNARY(neg, S, T, T, "neg %0, %0", W)
247 CK_PR_UNARY_S(32, uint32_t, "w")
248 CK_PR_UNARY_S(uint, unsigned int, "w")
249 CK_PR_UNARY_S(int, int, "w")
254 #define CK_PR_BINARY(O, N, M, T, I, W) \ argument
259 __asm__ __volatile__("1:" \
260 "l" W "arx %0, 0, %1;" \
262 "st" W "cx. %0, 0, %1;" \
263 "bne- 1b;" \
271 CK_PR_BINARY(and, ptr, void, uintptr_t, "and", "w")
272 CK_PR_BINARY(add, ptr, void, uintptr_t, "add", "w")
273 CK_PR_BINARY(or, ptr, void, uintptr_t, "or", "w")
274 CK_PR_BINARY(sub, ptr, void, uintptr_t, "sub", "w")
275 CK_PR_BINARY(xor, ptr, void, uintptr_t, "xor", "w")
277 #define CK_PR_BINARY_S(S, T, W) \ argument
278 CK_PR_BINARY(and, S, T, T, "and", W) \
279 CK_PR_BINARY(add, S, T, T, "add", W) \
280 CK_PR_BINARY(or, S, T, T, "or", W) \
281 CK_PR_BINARY(sub, S, T, T, "subf", W) \
282 CK_PR_BINARY(xor, S, T, T, "xor", W)
284 CK_PR_BINARY_S(32, uint32_t, "w")
285 CK_PR_BINARY_S(uint, unsigned int, "w")
286 CK_PR_BINARY_S(int, int, "w")
296 __asm__ __volatile__("1:"
298 "add %1, %3, %0;"
299 "stwcx. %1, 0, %2;"
300 "bne- 1b;"
310 #define CK_PR_FAA(S, T, W) \ argument
315 __asm__ __volatile__("1:" \
316 "l" W "arx %0, 0, %2;" \
317 "add %1, %3, %0;" \
318 "st" W "cx. %1, 0, %2;" \
319 "bne- 1b;" \
328 CK_PR_FAA(32, uint32_t, "w")
329 CK_PR_FAA(uint, unsigned int, "w")
330 CK_PR_FAA(int, int, "w")