2 * Copyright (c) 1991-1994 by Xerox Corporation. All rights reserved.
3 * Copyright (c) 1996-1999 by Silicon Graphics. All rights reserved.
4 * Copyright (c) 1999-2003 by Hewlett-Packard Company. All rights reserved.
7 * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
8 * OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
10 * Permission is hereby granted to use or copy this program
11 * for any purpose, provided the above notices are retained on all copies.
12 * Permission to modify the code and to distribute modified code is granted,
13 * provided the above notices are retained, and a notice that the code was
14 * modified is included with the above copyright notice.
18 /* FIXME. Very incomplete. */
19 #include "../all_aligned_atomic_load_store.h"
21 /* Are there any m68k multiprocessors still around? */
22 /* AFAIK, Alliants were sequentially consistent. */
23 #include "../ordered.h"
25 #include "../test_and_set_t_is_ao_t.h"
27 /* Contributed by Tony Mantler or new. Should be changed to MIT license? */
29 AO_test_and_set_full(volatile AO_TS_t *addr) {
32 /* The return value is semi-phony. */
33 /* 'tas' sets bit 7 while the return */
34 /* value pretends bit 0 was set */
36 "tas %1@; sne %0; negb %0"
38 : "a" (addr) : "memory");
42 #define AO_HAVE_test_and_set_full