Jan Voung | a3a01a2 | 2014-07-14 10:32:41 -0700 | [diff] [blame] | 1 | //===- subzero/crosstest/test_sync_atomic.h - Test prototypes ---*- C++ -*-===// |
| 2 | // |
| 3 | // The Subzero Code Generator |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
| 10 | // This file declares the function prototypes for cross testing atomic |
| 11 | // intrinsics. |
| 12 | // |
| 13 | //===----------------------------------------------------------------------===// |
| 14 | |
| 15 | #include "test_sync_atomic.def" |
| 16 | |
Jim Stichnoth | dd842db | 2015-01-27 12:53:53 -0800 | [diff] [blame] | 17 | #define X(inst, type) \ |
| 18 | type test_##inst(bool fetch_first, volatile type *ptr, type a); \ |
| 19 | type test_alloca_##inst(bool fetch, volatile type *ptr, type a); \ |
Jan Voung | a3a01a2 | 2014-07-14 10:32:41 -0700 | [diff] [blame] | 20 | type test_const_##inst(bool fetch, volatile type *ptr, type ignored); |
| 21 | |
| 22 | FOR_ALL_RMWOP_TYPES(X) |
| 23 | #undef X |
| 24 | |
Jan Voung | c820ddf | 2014-07-29 14:38:51 -0700 | [diff] [blame] | 25 | #define X(type) \ |
| 26 | type test_val_cmp_swap(volatile type *ptr, type oldval, type newval); \ |
| 27 | type test_val_cmp_swap_loop(volatile type *ptr, type oldval, type newval); |
Jan Voung | a3a01a2 | 2014-07-14 10:32:41 -0700 | [diff] [blame] | 28 | |
| 29 | ATOMIC_TYPE_TABLE |
| 30 | #undef X |