sync-builtins.def 27 KB

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