source: libcfa/prelude/sync-builtins.def @ 9139540

ADTarm-ehast-experimentalenumforall-pointer-decayjacob/cs343-translationnew-ast-unique-exprpthread-emulationqualifiedEnum
Last change on this file since 9139540 was bf71cfd, checked in by Thierry Delisle <tdelisle@…>, 6 years ago

Moved up many directories in source

  • Property mode set to 100644
File size: 27.0 KB
Line 
1/* This file contains the definitions and documentation for the
2   synchronization builtins used in the GNU compiler.
3   Copyright (C) 2005-2016 Free Software Foundation, Inc.
4
5This file is part of GCC.
6
7GCC is free software; you can redistribute it and/or modify it under
8the terms of the GNU General Public License as published by the Free
9Software Foundation; either version 3, or (at your option) any later
10version.
11
12GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13WARRANTY; without even the implied warranty of MERCHANTABILITY or
14FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
15for more details.
16
17You should have received a copy of the GNU General Public License
18along with GCC; see the file COPYING3.  If not see
19<http://www.gnu.org/licenses/>.  */
20
21/* Before including this file, you should define a macro:
22
23     DEF_SYNC_BUILTIN (ENUM, NAME, TYPE, ATTRS)
24
25   See builtins.def for details.  */
26
27/* Synchronization Primitives.  The "_N" version is the one that the user
28   is supposed to be using.  It's overloaded, and is resolved to one of the
29   "_1" through "_16" versions, plus some extra casts.  */
30
31DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_ADD_N, "__sync_fetch_and_add",
32                  BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
33DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_ADD_1, "__sync_fetch_and_add_1",
34                  BT_FN_I1_VPTR_I1, ATTR_NOTHROWCALL_LEAF_LIST)
35DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_ADD_2, "__sync_fetch_and_add_2",
36                  BT_FN_I2_VPTR_I2, ATTR_NOTHROWCALL_LEAF_LIST)
37DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_ADD_4, "__sync_fetch_and_add_4",
38                  BT_FN_I4_VPTR_I4, ATTR_NOTHROWCALL_LEAF_LIST)
39DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_ADD_8, "__sync_fetch_and_add_8",
40                  BT_FN_I8_VPTR_I8, ATTR_NOTHROWCALL_LEAF_LIST)
41DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_ADD_16, "__sync_fetch_and_add_16",
42                  BT_FN_I16_VPTR_I16, ATTR_NOTHROWCALL_LEAF_LIST)
43
44DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_SUB_N, "__sync_fetch_and_sub",
45                  BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
46DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_SUB_1, "__sync_fetch_and_sub_1",
47                  BT_FN_I1_VPTR_I1, ATTR_NOTHROWCALL_LEAF_LIST)
48DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_SUB_2, "__sync_fetch_and_sub_2",
49                  BT_FN_I2_VPTR_I2, ATTR_NOTHROWCALL_LEAF_LIST)
50DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_SUB_4, "__sync_fetch_and_sub_4",
51                  BT_FN_I4_VPTR_I4, ATTR_NOTHROWCALL_LEAF_LIST)
52DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_SUB_8, "__sync_fetch_and_sub_8",
53                  BT_FN_I8_VPTR_I8, ATTR_NOTHROWCALL_LEAF_LIST)
54DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_SUB_16, "__sync_fetch_and_sub_16",
55                  BT_FN_I16_VPTR_I16, ATTR_NOTHROWCALL_LEAF_LIST)
56
57DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_OR_N, "__sync_fetch_and_or",
58                  BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
59DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_OR_1, "__sync_fetch_and_or_1",
60                  BT_FN_I1_VPTR_I1, ATTR_NOTHROWCALL_LEAF_LIST)
61DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_OR_2, "__sync_fetch_and_or_2",
62                  BT_FN_I2_VPTR_I2, ATTR_NOTHROWCALL_LEAF_LIST)
63DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_OR_4, "__sync_fetch_and_or_4",
64                  BT_FN_I4_VPTR_I4, ATTR_NOTHROWCALL_LEAF_LIST)
65DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_OR_8, "__sync_fetch_and_or_8",
66                  BT_FN_I8_VPTR_I8, ATTR_NOTHROWCALL_LEAF_LIST)
67DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_OR_16, "__sync_fetch_and_or_16",
68                  BT_FN_I16_VPTR_I16, ATTR_NOTHROWCALL_LEAF_LIST)
69
70DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_AND_N, "__sync_fetch_and_and",
71                  BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
72DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_AND_1, "__sync_fetch_and_and_1",
73                  BT_FN_I1_VPTR_I1, ATTR_NOTHROWCALL_LEAF_LIST)
74DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_AND_2, "__sync_fetch_and_and_2",
75                  BT_FN_I2_VPTR_I2, ATTR_NOTHROWCALL_LEAF_LIST)
76DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_AND_4, "__sync_fetch_and_and_4",
77                  BT_FN_I4_VPTR_I4, ATTR_NOTHROWCALL_LEAF_LIST)
78DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_AND_8, "__sync_fetch_and_and_8",
79                  BT_FN_I8_VPTR_I8, ATTR_NOTHROWCALL_LEAF_LIST)
80DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_AND_16, "__sync_fetch_and_and_16",
81                  BT_FN_I16_VPTR_I16, ATTR_NOTHROWCALL_LEAF_LIST)
82
83DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_XOR_N, "__sync_fetch_and_xor",
84                  BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
85DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_XOR_1, "__sync_fetch_and_xor_1",
86                  BT_FN_I1_VPTR_I1, ATTR_NOTHROWCALL_LEAF_LIST)
87DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_XOR_2, "__sync_fetch_and_xor_2",
88                  BT_FN_I2_VPTR_I2, ATTR_NOTHROWCALL_LEAF_LIST)
89DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_XOR_4, "__sync_fetch_and_xor_4",
90                  BT_FN_I4_VPTR_I4, ATTR_NOTHROWCALL_LEAF_LIST)
91DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_XOR_8, "__sync_fetch_and_xor_8",
92                  BT_FN_I8_VPTR_I8, ATTR_NOTHROWCALL_LEAF_LIST)
93DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_XOR_16, "__sync_fetch_and_xor_16",
94                  BT_FN_I16_VPTR_I16, ATTR_NOTHROWCALL_LEAF_LIST)
95
96DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_NAND_N, "__sync_fetch_and_nand",
97                  BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
98DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_NAND_1, "__sync_fetch_and_nand_1",
99                  BT_FN_I1_VPTR_I1, ATTR_NOTHROWCALL_LEAF_LIST)
100DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_NAND_2, "__sync_fetch_and_nand_2",
101                  BT_FN_I2_VPTR_I2, ATTR_NOTHROWCALL_LEAF_LIST)
102DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_NAND_4, "__sync_fetch_and_nand_4",
103                  BT_FN_I4_VPTR_I4, ATTR_NOTHROWCALL_LEAF_LIST)
104DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_NAND_8, "__sync_fetch_and_nand_8",
105                  BT_FN_I8_VPTR_I8, ATTR_NOTHROWCALL_LEAF_LIST)
106DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_NAND_16, "__sync_fetch_and_nand_16",
107                  BT_FN_I16_VPTR_I16, ATTR_NOTHROWCALL_LEAF_LIST)
108
109DEF_SYNC_BUILTIN (BUILT_IN_SYNC_ADD_AND_FETCH_N, "__sync_add_and_fetch",
110                  BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
111DEF_SYNC_BUILTIN (BUILT_IN_SYNC_ADD_AND_FETCH_1, "__sync_add_and_fetch_1",
112                  BT_FN_I1_VPTR_I1, ATTR_NOTHROWCALL_LEAF_LIST)
113DEF_SYNC_BUILTIN (BUILT_IN_SYNC_ADD_AND_FETCH_2, "__sync_add_and_fetch_2",
114                  BT_FN_I2_VPTR_I2, ATTR_NOTHROWCALL_LEAF_LIST)
115DEF_SYNC_BUILTIN (BUILT_IN_SYNC_ADD_AND_FETCH_4, "__sync_add_and_fetch_4",
116                  BT_FN_I4_VPTR_I4, ATTR_NOTHROWCALL_LEAF_LIST)
117DEF_SYNC_BUILTIN (BUILT_IN_SYNC_ADD_AND_FETCH_8, "__sync_add_and_fetch_8",
118                  BT_FN_I8_VPTR_I8, ATTR_NOTHROWCALL_LEAF_LIST)
119DEF_SYNC_BUILTIN (BUILT_IN_SYNC_ADD_AND_FETCH_16, "__sync_add_and_fetch_16",
120                  BT_FN_I16_VPTR_I16, ATTR_NOTHROWCALL_LEAF_LIST)
121
122DEF_SYNC_BUILTIN (BUILT_IN_SYNC_SUB_AND_FETCH_N, "__sync_sub_and_fetch",
123                  BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
124DEF_SYNC_BUILTIN (BUILT_IN_SYNC_SUB_AND_FETCH_1, "__sync_sub_and_fetch_1",
125                  BT_FN_I1_VPTR_I1, ATTR_NOTHROWCALL_LEAF_LIST)
126DEF_SYNC_BUILTIN (BUILT_IN_SYNC_SUB_AND_FETCH_2, "__sync_sub_and_fetch_2",
127                  BT_FN_I2_VPTR_I2, ATTR_NOTHROWCALL_LEAF_LIST)
128DEF_SYNC_BUILTIN (BUILT_IN_SYNC_SUB_AND_FETCH_4, "__sync_sub_and_fetch_4",
129                  BT_FN_I4_VPTR_I4, ATTR_NOTHROWCALL_LEAF_LIST)
130DEF_SYNC_BUILTIN (BUILT_IN_SYNC_SUB_AND_FETCH_8, "__sync_sub_and_fetch_8",
131                  BT_FN_I8_VPTR_I8, ATTR_NOTHROWCALL_LEAF_LIST)
132DEF_SYNC_BUILTIN (BUILT_IN_SYNC_SUB_AND_FETCH_16, "__sync_sub_and_fetch_16",
133                  BT_FN_I16_VPTR_I16, ATTR_NOTHROWCALL_LEAF_LIST)
134
135DEF_SYNC_BUILTIN (BUILT_IN_SYNC_OR_AND_FETCH_N, "__sync_or_and_fetch",
136                  BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
137DEF_SYNC_BUILTIN (BUILT_IN_SYNC_OR_AND_FETCH_1, "__sync_or_and_fetch_1",
138                  BT_FN_I1_VPTR_I1, ATTR_NOTHROWCALL_LEAF_LIST)
139DEF_SYNC_BUILTIN (BUILT_IN_SYNC_OR_AND_FETCH_2, "__sync_or_and_fetch_2",
140                  BT_FN_I2_VPTR_I2, ATTR_NOTHROWCALL_LEAF_LIST)
141DEF_SYNC_BUILTIN (BUILT_IN_SYNC_OR_AND_FETCH_4, "__sync_or_and_fetch_4",
142                  BT_FN_I4_VPTR_I4, ATTR_NOTHROWCALL_LEAF_LIST)
143DEF_SYNC_BUILTIN (BUILT_IN_SYNC_OR_AND_FETCH_8, "__sync_or_and_fetch_8",
144                  BT_FN_I8_VPTR_I8, ATTR_NOTHROWCALL_LEAF_LIST)
145DEF_SYNC_BUILTIN (BUILT_IN_SYNC_OR_AND_FETCH_16, "__sync_or_and_fetch_16",
146                  BT_FN_I16_VPTR_I16, ATTR_NOTHROWCALL_LEAF_LIST)
147
148DEF_SYNC_BUILTIN (BUILT_IN_SYNC_AND_AND_FETCH_N, "__sync_and_and_fetch",
149                  BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
150DEF_SYNC_BUILTIN (BUILT_IN_SYNC_AND_AND_FETCH_1, "__sync_and_and_fetch_1",
151                  BT_FN_I1_VPTR_I1, ATTR_NOTHROWCALL_LEAF_LIST)
152DEF_SYNC_BUILTIN (BUILT_IN_SYNC_AND_AND_FETCH_2, "__sync_and_and_fetch_2",
153                  BT_FN_I2_VPTR_I2, ATTR_NOTHROWCALL_LEAF_LIST)
154DEF_SYNC_BUILTIN (BUILT_IN_SYNC_AND_AND_FETCH_4, "__sync_and_and_fetch_4",
155                  BT_FN_I4_VPTR_I4, ATTR_NOTHROWCALL_LEAF_LIST)
156DEF_SYNC_BUILTIN (BUILT_IN_SYNC_AND_AND_FETCH_8, "__sync_and_and_fetch_8",
157                  BT_FN_I8_VPTR_I8, ATTR_NOTHROWCALL_LEAF_LIST)
158DEF_SYNC_BUILTIN (BUILT_IN_SYNC_AND_AND_FETCH_16, "__sync_and_and_fetch_16",
159                  BT_FN_I16_VPTR_I16, ATTR_NOTHROWCALL_LEAF_LIST)
160
161DEF_SYNC_BUILTIN (BUILT_IN_SYNC_XOR_AND_FETCH_N, "__sync_xor_and_fetch",
162                  BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
163DEF_SYNC_BUILTIN (BUILT_IN_SYNC_XOR_AND_FETCH_1, "__sync_xor_and_fetch_1",
164                  BT_FN_I1_VPTR_I1, ATTR_NOTHROWCALL_LEAF_LIST)
165DEF_SYNC_BUILTIN (BUILT_IN_SYNC_XOR_AND_FETCH_2, "__sync_xor_and_fetch_2",
166                  BT_FN_I2_VPTR_I2, ATTR_NOTHROWCALL_LEAF_LIST)
167DEF_SYNC_BUILTIN (BUILT_IN_SYNC_XOR_AND_FETCH_4, "__sync_xor_and_fetch_4",
168                  BT_FN_I4_VPTR_I4, ATTR_NOTHROWCALL_LEAF_LIST)
169DEF_SYNC_BUILTIN (BUILT_IN_SYNC_XOR_AND_FETCH_8, "__sync_xor_and_fetch_8",
170                  BT_FN_I8_VPTR_I8, ATTR_NOTHROWCALL_LEAF_LIST)
171DEF_SYNC_BUILTIN (BUILT_IN_SYNC_XOR_AND_FETCH_16, "__sync_xor_and_fetch_16",
172                  BT_FN_I16_VPTR_I16, ATTR_NOTHROWCALL_LEAF_LIST)
173
174DEF_SYNC_BUILTIN (BUILT_IN_SYNC_NAND_AND_FETCH_N, "__sync_nand_and_fetch",
175                  BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
176DEF_SYNC_BUILTIN (BUILT_IN_SYNC_NAND_AND_FETCH_1, "__sync_nand_and_fetch_1",
177                  BT_FN_I1_VPTR_I1, ATTR_NOTHROWCALL_LEAF_LIST)
178DEF_SYNC_BUILTIN (BUILT_IN_SYNC_NAND_AND_FETCH_2, "__sync_nand_and_fetch_2",
179                  BT_FN_I2_VPTR_I2, ATTR_NOTHROWCALL_LEAF_LIST)
180DEF_SYNC_BUILTIN (BUILT_IN_SYNC_NAND_AND_FETCH_4, "__sync_nand_and_fetch_4",
181                  BT_FN_I4_VPTR_I4, ATTR_NOTHROWCALL_LEAF_LIST)
182DEF_SYNC_BUILTIN (BUILT_IN_SYNC_NAND_AND_FETCH_8, "__sync_nand_and_fetch_8",
183                  BT_FN_I8_VPTR_I8, ATTR_NOTHROWCALL_LEAF_LIST)
184DEF_SYNC_BUILTIN (BUILT_IN_SYNC_NAND_AND_FETCH_16, "__sync_nand_and_fetch_16",
185                  BT_FN_I16_VPTR_I16, ATTR_NOTHROWCALL_LEAF_LIST)
186
187DEF_SYNC_BUILTIN (BUILT_IN_SYNC_BOOL_COMPARE_AND_SWAP_N,
188                  "__sync_bool_compare_and_swap",
189                  BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
190DEF_SYNC_BUILTIN (BUILT_IN_SYNC_BOOL_COMPARE_AND_SWAP_1,
191                  "__sync_bool_compare_and_swap_1",
192                  BT_FN_BOOL_VPTR_I1_I1, ATTR_NOTHROWCALL_LEAF_LIST)
193DEF_SYNC_BUILTIN (BUILT_IN_SYNC_BOOL_COMPARE_AND_SWAP_2,
194                  "__sync_bool_compare_and_swap_2",
195                  BT_FN_BOOL_VPTR_I2_I2, ATTR_NOTHROWCALL_LEAF_LIST)
196DEF_SYNC_BUILTIN (BUILT_IN_SYNC_BOOL_COMPARE_AND_SWAP_4,
197                  "__sync_bool_compare_and_swap_4",
198                  BT_FN_BOOL_VPTR_I4_I4, ATTR_NOTHROWCALL_LEAF_LIST)
199DEF_SYNC_BUILTIN (BUILT_IN_SYNC_BOOL_COMPARE_AND_SWAP_8,
200                  "__sync_bool_compare_and_swap_8",
201                  BT_FN_BOOL_VPTR_I8_I8, ATTR_NOTHROWCALL_LEAF_LIST)
202DEF_SYNC_BUILTIN (BUILT_IN_SYNC_BOOL_COMPARE_AND_SWAP_16,
203                  "__sync_bool_compare_and_swap_16",
204                  BT_FN_BOOL_VPTR_I16_I16, ATTR_NOTHROWCALL_LEAF_LIST)
205
206DEF_SYNC_BUILTIN (BUILT_IN_SYNC_VAL_COMPARE_AND_SWAP_N,
207                  "__sync_val_compare_and_swap",
208                  BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
209DEF_SYNC_BUILTIN (BUILT_IN_SYNC_VAL_COMPARE_AND_SWAP_1,
210                  "__sync_val_compare_and_swap_1",
211                  BT_FN_I1_VPTR_I1_I1, ATTR_NOTHROWCALL_LEAF_LIST)
212DEF_SYNC_BUILTIN (BUILT_IN_SYNC_VAL_COMPARE_AND_SWAP_2,
213                  "__sync_val_compare_and_swap_2",
214                  BT_FN_I2_VPTR_I2_I2, ATTR_NOTHROWCALL_LEAF_LIST)
215DEF_SYNC_BUILTIN (BUILT_IN_SYNC_VAL_COMPARE_AND_SWAP_4,
216                  "__sync_val_compare_and_swap_4",
217                  BT_FN_I4_VPTR_I4_I4, ATTR_NOTHROWCALL_LEAF_LIST)
218DEF_SYNC_BUILTIN (BUILT_IN_SYNC_VAL_COMPARE_AND_SWAP_8,
219                  "__sync_val_compare_and_swap_8",
220                  BT_FN_I8_VPTR_I8_I8, ATTR_NOTHROWCALL_LEAF_LIST)
221DEF_SYNC_BUILTIN (BUILT_IN_SYNC_VAL_COMPARE_AND_SWAP_16,
222                  "__sync_val_compare_and_swap_16",
223                  BT_FN_I16_VPTR_I16_I16, ATTR_NOTHROWCALL_LEAF_LIST)
224
225DEF_SYNC_BUILTIN (BUILT_IN_SYNC_LOCK_TEST_AND_SET_N,
226                  "__sync_lock_test_and_set",
227                  BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
228DEF_SYNC_BUILTIN (BUILT_IN_SYNC_LOCK_TEST_AND_SET_1,
229                  "__sync_lock_test_and_set_1",
230                  BT_FN_I1_VPTR_I1, ATTR_NOTHROWCALL_LEAF_LIST)
231DEF_SYNC_BUILTIN (BUILT_IN_SYNC_LOCK_TEST_AND_SET_2,
232                  "__sync_lock_test_and_set_2",
233                  BT_FN_I2_VPTR_I2, ATTR_NOTHROWCALL_LEAF_LIST)
234DEF_SYNC_BUILTIN (BUILT_IN_SYNC_LOCK_TEST_AND_SET_4,
235                  "__sync_lock_test_and_set_4",
236                  BT_FN_I4_VPTR_I4, ATTR_NOTHROWCALL_LEAF_LIST)
237DEF_SYNC_BUILTIN (BUILT_IN_SYNC_LOCK_TEST_AND_SET_8,
238                  "__sync_lock_test_and_set_8",
239                  BT_FN_I8_VPTR_I8, ATTR_NOTHROWCALL_LEAF_LIST)
240DEF_SYNC_BUILTIN (BUILT_IN_SYNC_LOCK_TEST_AND_SET_16,
241                  "__sync_lock_test_and_set_16",
242                  BT_FN_I16_VPTR_I16, ATTR_NOTHROWCALL_LEAF_LIST)
243
244DEF_SYNC_BUILTIN (BUILT_IN_SYNC_LOCK_RELEASE_N, "__sync_lock_release",
245                  BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
246DEF_SYNC_BUILTIN (BUILT_IN_SYNC_LOCK_RELEASE_1, "__sync_lock_release_1",
247                  BT_FN_VOID_VPTR, ATTR_NOTHROWCALL_LEAF_LIST)
248DEF_SYNC_BUILTIN (BUILT_IN_SYNC_LOCK_RELEASE_2, "__sync_lock_release_2",
249                  BT_FN_VOID_VPTR, ATTR_NOTHROWCALL_LEAF_LIST)
250DEF_SYNC_BUILTIN (BUILT_IN_SYNC_LOCK_RELEASE_4, "__sync_lock_release_4",
251                  BT_FN_VOID_VPTR, ATTR_NOTHROWCALL_LEAF_LIST)
252DEF_SYNC_BUILTIN (BUILT_IN_SYNC_LOCK_RELEASE_8, "__sync_lock_release_8",
253                  BT_FN_VOID_VPTR, ATTR_NOTHROWCALL_LEAF_LIST)
254DEF_SYNC_BUILTIN (BUILT_IN_SYNC_LOCK_RELEASE_16, "__sync_lock_release_16",
255                  BT_FN_VOID_VPTR, ATTR_NOTHROWCALL_LEAF_LIST)
256
257DEF_SYNC_BUILTIN (BUILT_IN_SYNC_SYNCHRONIZE, "__sync_synchronize",
258                  BT_FN_VOID, ATTR_NOTHROWCALL_LEAF_LIST)
259
260/* __sync* builtins for the C++ memory model.  */
261
262DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_TEST_AND_SET, "__atomic_test_and_set",
263                  BT_FN_BOOL_VPTR_INT, ATTR_NOTHROWCALL_LEAF_LIST)
264
265DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_CLEAR, "__atomic_clear", BT_FN_VOID_VPTR_INT,
266                  ATTR_NOTHROWCALL_LEAF_LIST)
267
268DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_EXCHANGE,
269                  "__atomic_exchange",
270                  BT_FN_VOID_SIZE_VPTR_PTR_PTR_INT, ATTR_NOTHROWCALL_LEAF_LIST)
271DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_EXCHANGE_N,
272                  "__atomic_exchange_n",
273                  BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
274DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_EXCHANGE_1,
275                  "__atomic_exchange_1",
276                  BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROWCALL_LEAF_LIST)
277DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_EXCHANGE_2,
278                  "__atomic_exchange_2",
279                  BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROWCALL_LEAF_LIST)
280DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_EXCHANGE_4,
281                  "__atomic_exchange_4",
282                  BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROWCALL_LEAF_LIST)
283DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_EXCHANGE_8,
284                  "__atomic_exchange_8",
285                  BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROWCALL_LEAF_LIST)
286DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_EXCHANGE_16,
287                  "__atomic_exchange_16",
288                  BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROWCALL_LEAF_LIST)
289
290DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_LOAD,
291                  "__atomic_load",
292                  BT_FN_VOID_SIZE_CONST_VPTR_PTR_INT,
293                  ATTR_NOTHROWCALL_LEAF_LIST)
294DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_LOAD_N,
295                  "__atomic_load_n",
296                  BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
297DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_LOAD_1,
298                  "__atomic_load_1",
299                  BT_FN_I1_CONST_VPTR_INT, ATTR_NOTHROWCALL_LEAF_LIST)
300DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_LOAD_2,
301                  "__atomic_load_2",
302                  BT_FN_I2_CONST_VPTR_INT, ATTR_NOTHROWCALL_LEAF_LIST)
303DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_LOAD_4,
304                  "__atomic_load_4",
305                  BT_FN_I4_CONST_VPTR_INT, ATTR_NOTHROWCALL_LEAF_LIST)
306DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_LOAD_8,
307                  "__atomic_load_8",
308                  BT_FN_I8_CONST_VPTR_INT, ATTR_NOTHROWCALL_LEAF_LIST)
309DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_LOAD_16,
310                  "__atomic_load_16",
311                  BT_FN_I16_CONST_VPTR_INT, ATTR_NOTHROWCALL_LEAF_LIST)
312
313DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_COMPARE_EXCHANGE,
314                  "__atomic_compare_exchange",
315                  BT_FN_BOOL_SIZE_VPTR_PTR_PTR_INT_INT,
316                  ATTR_NOTHROWCALL_LEAF_LIST)
317DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_COMPARE_EXCHANGE_N,
318                  "__atomic_compare_exchange_n",
319                  BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
320DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_COMPARE_EXCHANGE_1,
321                  "__atomic_compare_exchange_1",
322                  BT_FN_BOOL_VPTR_PTR_I1_BOOL_INT_INT,
323                  ATTR_NOTHROWCALL_LEAF_LIST)
324DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_COMPARE_EXCHANGE_2,
325                  "__atomic_compare_exchange_2",
326                  BT_FN_BOOL_VPTR_PTR_I2_BOOL_INT_INT,
327                  ATTR_NOTHROWCALL_LEAF_LIST)
328DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_COMPARE_EXCHANGE_4,
329                  "__atomic_compare_exchange_4",
330                  BT_FN_BOOL_VPTR_PTR_I4_BOOL_INT_INT,
331                  ATTR_NOTHROWCALL_LEAF_LIST)
332DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_COMPARE_EXCHANGE_8,
333                  "__atomic_compare_exchange_8",
334                  BT_FN_BOOL_VPTR_PTR_I8_BOOL_INT_INT,
335                  ATTR_NOTHROWCALL_LEAF_LIST)
336DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_COMPARE_EXCHANGE_16,
337                  "__atomic_compare_exchange_16",
338                  BT_FN_BOOL_VPTR_PTR_I16_BOOL_INT_INT,
339                  ATTR_NOTHROWCALL_LEAF_LIST)
340
341DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_STORE,
342                  "__atomic_store",
343                  BT_FN_VOID_SIZE_VPTR_PTR_INT, ATTR_NOTHROWCALL_LEAF_LIST)
344DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_STORE_N,
345                  "__atomic_store_n",
346                  BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
347DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_STORE_1,
348                  "__atomic_store_1",
349                  BT_FN_VOID_VPTR_I1_INT, ATTR_NOTHROWCALL_LEAF_LIST)
350DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_STORE_2,
351                  "__atomic_store_2",
352                  BT_FN_VOID_VPTR_I2_INT, ATTR_NOTHROWCALL_LEAF_LIST)
353DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_STORE_4,
354                  "__atomic_store_4",
355                  BT_FN_VOID_VPTR_I4_INT, ATTR_NOTHROWCALL_LEAF_LIST)
356DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_STORE_8,
357                  "__atomic_store_8",
358                  BT_FN_VOID_VPTR_I8_INT, ATTR_NOTHROWCALL_LEAF_LIST)
359DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_STORE_16,
360                  "__atomic_store_16",
361                  BT_FN_VOID_VPTR_I16_INT, ATTR_NOTHROWCALL_LEAF_LIST)
362
363DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_ADD_FETCH_N,
364                  "__atomic_add_fetch",
365                  BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
366DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_ADD_FETCH_1,
367                  "__atomic_add_fetch_1",
368                  BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROWCALL_LEAF_LIST)
369DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_ADD_FETCH_2,
370                  "__atomic_add_fetch_2",
371                  BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROWCALL_LEAF_LIST)
372DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_ADD_FETCH_4,
373                  "__atomic_add_fetch_4",
374                  BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROWCALL_LEAF_LIST)
375DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_ADD_FETCH_8,
376                  "__atomic_add_fetch_8",
377                  BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROWCALL_LEAF_LIST)
378DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_ADD_FETCH_16,
379                  "__atomic_add_fetch_16",
380                  BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROWCALL_LEAF_LIST)
381
382DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_SUB_FETCH_N,
383                  "__atomic_sub_fetch",
384                  BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
385DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_SUB_FETCH_1,
386                  "__atomic_sub_fetch_1",
387                  BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROWCALL_LEAF_LIST)
388DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_SUB_FETCH_2,
389                  "__atomic_sub_fetch_2",
390                  BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROWCALL_LEAF_LIST)
391DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_SUB_FETCH_4,
392                  "__atomic_sub_fetch_4",
393                  BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROWCALL_LEAF_LIST)
394DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_SUB_FETCH_8,
395                  "__atomic_sub_fetch_8",
396                  BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROWCALL_LEAF_LIST)
397DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_SUB_FETCH_16,
398                  "__atomic_sub_fetch_16",
399                  BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROWCALL_LEAF_LIST)
400
401DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_AND_FETCH_N,
402                  "__atomic_and_fetch",
403                  BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
404DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_AND_FETCH_1,
405                  "__atomic_and_fetch_1",
406                  BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROWCALL_LEAF_LIST)
407DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_AND_FETCH_2,
408                  "__atomic_and_fetch_2",
409                  BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROWCALL_LEAF_LIST)
410DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_AND_FETCH_4,
411                  "__atomic_and_fetch_4",
412                  BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROWCALL_LEAF_LIST)
413DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_AND_FETCH_8,
414                  "__atomic_and_fetch_8",
415                  BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROWCALL_LEAF_LIST)
416DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_AND_FETCH_16,
417                  "__atomic_and_fetch_16",
418                  BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROWCALL_LEAF_LIST)
419
420DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_NAND_FETCH_N,
421                  "__atomic_nand_fetch",
422                  BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
423DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_NAND_FETCH_1,
424                  "__atomic_nand_fetch_1",
425                  BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROWCALL_LEAF_LIST)
426DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_NAND_FETCH_2,
427                  "__atomic_nand_fetch_2",
428                  BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROWCALL_LEAF_LIST)
429DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_NAND_FETCH_4,
430                  "__atomic_nand_fetch_4",
431                  BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROWCALL_LEAF_LIST)
432DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_NAND_FETCH_8,
433                  "__atomic_nand_fetch_8",
434                  BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROWCALL_LEAF_LIST)
435DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_NAND_FETCH_16,
436                  "__atomic_nand_fetch_16",
437                  BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROWCALL_LEAF_LIST)
438
439DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_XOR_FETCH_N,
440                  "__atomic_xor_fetch",
441                  BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
442DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_XOR_FETCH_1,
443                  "__atomic_xor_fetch_1",
444                  BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROWCALL_LEAF_LIST)
445DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_XOR_FETCH_2,
446                  "__atomic_xor_fetch_2",
447                  BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROWCALL_LEAF_LIST)
448DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_XOR_FETCH_4,
449                  "__atomic_xor_fetch_4",
450                  BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROWCALL_LEAF_LIST)
451DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_XOR_FETCH_8,
452                  "__atomic_xor_fetch_8",
453                  BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROWCALL_LEAF_LIST)
454DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_XOR_FETCH_16,
455                  "__atomic_xor_fetch_16",
456                  BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROWCALL_LEAF_LIST)
457
458DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_OR_FETCH_N,
459                  "__atomic_or_fetch",
460                  BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
461DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_OR_FETCH_1,
462                  "__atomic_or_fetch_1",
463                  BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROWCALL_LEAF_LIST)
464DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_OR_FETCH_2,
465                  "__atomic_or_fetch_2",
466                  BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROWCALL_LEAF_LIST)
467DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_OR_FETCH_4,
468                  "__atomic_or_fetch_4",
469                  BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROWCALL_LEAF_LIST)
470DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_OR_FETCH_8,
471                  "__atomic_or_fetch_8",
472                  BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROWCALL_LEAF_LIST)
473DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_OR_FETCH_16,
474                  "__atomic_or_fetch_16",
475                  BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROWCALL_LEAF_LIST)
476
477DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_ADD_N,
478                  "__atomic_fetch_add",
479                  BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
480DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_ADD_1,
481                  "__atomic_fetch_add_1",
482                  BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROWCALL_LEAF_LIST)
483DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_ADD_2,
484                  "__atomic_fetch_add_2",
485                  BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROWCALL_LEAF_LIST)
486DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_ADD_4,
487                  "__atomic_fetch_add_4",
488                  BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROWCALL_LEAF_LIST)
489DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_ADD_8,
490                  "__atomic_fetch_add_8",
491                  BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROWCALL_LEAF_LIST)
492DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_ADD_16,
493                  "__atomic_fetch_add_16",
494                  BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROWCALL_LEAF_LIST)
495
496DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_SUB_N,
497                  "__atomic_fetch_sub",
498                  BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
499DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_SUB_1,
500                  "__atomic_fetch_sub_1",
501                  BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROWCALL_LEAF_LIST)
502DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_SUB_2,
503                  "__atomic_fetch_sub_2",
504                  BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROWCALL_LEAF_LIST)
505DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_SUB_4,
506                  "__atomic_fetch_sub_4",
507                  BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROWCALL_LEAF_LIST)
508DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_SUB_8,
509                  "__atomic_fetch_sub_8",
510                  BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROWCALL_LEAF_LIST)
511DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_SUB_16,
512                  "__atomic_fetch_sub_16",
513                  BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROWCALL_LEAF_LIST)
514
515DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_AND_N,
516                  "__atomic_fetch_and",
517                  BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
518DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_AND_1,
519                  "__atomic_fetch_and_1",
520                  BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROWCALL_LEAF_LIST)
521DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_AND_2,
522                  "__atomic_fetch_and_2",
523                  BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROWCALL_LEAF_LIST)
524DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_AND_4,
525                  "__atomic_fetch_and_4",
526                  BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROWCALL_LEAF_LIST)
527DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_AND_8,
528                  "__atomic_fetch_and_8",
529                  BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROWCALL_LEAF_LIST)
530DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_AND_16,
531                  "__atomic_fetch_and_16",
532                  BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROWCALL_LEAF_LIST)
533
534DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_NAND_N,
535                  "__atomic_fetch_nand",
536                  BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
537DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_NAND_1,
538                  "__atomic_fetch_nand_1",
539                  BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROWCALL_LEAF_LIST)
540DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_NAND_2,
541                  "__atomic_fetch_nand_2",
542                  BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROWCALL_LEAF_LIST)
543DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_NAND_4,
544                  "__atomic_fetch_nand_4",
545                  BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROWCALL_LEAF_LIST)
546DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_NAND_8,
547                  "__atomic_fetch_nand_8",
548                  BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROWCALL_LEAF_LIST)
549DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_NAND_16,
550                  "__atomic_fetch_nand_16",
551                  BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROWCALL_LEAF_LIST)
552
553DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_XOR_N,
554                  "__atomic_fetch_xor",
555                  BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
556DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_XOR_1,
557                  "__atomic_fetch_xor_1",
558                  BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROWCALL_LEAF_LIST)
559DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_XOR_2,
560                  "__atomic_fetch_xor_2",
561                  BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROWCALL_LEAF_LIST)
562DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_XOR_4,
563                  "__atomic_fetch_xor_4",
564                  BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROWCALL_LEAF_LIST)
565DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_XOR_8,
566                  "__atomic_fetch_xor_8",
567                  BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROWCALL_LEAF_LIST)
568DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_XOR_16,
569                  "__atomic_fetch_xor_16",
570                  BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROWCALL_LEAF_LIST)
571
572
573DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_OR_N,
574                  "__atomic_fetch_or",
575                  BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
576DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_OR_1,
577                  "__atomic_fetch_or_1",
578                  BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROWCALL_LEAF_LIST)
579DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_OR_2,
580                  "__atomic_fetch_or_2",
581                  BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROWCALL_LEAF_LIST)
582DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_OR_4,
583                  "__atomic_fetch_or_4",
584                  BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROWCALL_LEAF_LIST)
585DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_OR_8,
586                  "__atomic_fetch_or_8",
587                  BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROWCALL_LEAF_LIST)
588DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_OR_16,
589                  "__atomic_fetch_or_16",
590                  BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROWCALL_LEAF_LIST)
591
592DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_ALWAYS_LOCK_FREE,
593                  "__atomic_always_lock_free",
594                  BT_FN_BOOL_SIZE_CONST_VPTR, ATTR_CONST_NOTHROW_LEAF_LIST)
595
596DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_IS_LOCK_FREE,
597                  "__atomic_is_lock_free",
598                  BT_FN_BOOL_SIZE_CONST_VPTR, ATTR_CONST_NOTHROW_LEAF_LIST)
599
600
601DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_THREAD_FENCE,
602                  "__atomic_thread_fence",
603                  BT_FN_VOID_INT, ATTR_NOTHROW_LEAF_LIST)
604
605DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_SIGNAL_FENCE,
606                  "__atomic_signal_fence",
607                  BT_FN_VOID_INT, ATTR_NOTHROW_LEAF_LIST)
608
609/* This one is actually a function in libatomic and not expected to be
610   inlined, declared here for convenience of targets generating calls
611   to it.  */
612DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FERAISEEXCEPT,
613                  "__atomic_feraiseexcept",
614                  BT_FN_VOID_INT, ATTR_LEAF_LIST)
Note: See TracBrowser for help on using the repository browser.