]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/sanitizer.def
sh.md (mov<mode>): Replace movQIHI.
[thirdparty/gcc.git] / gcc / sanitizer.def
CommitLineData
0e668eaf
JJ
1/* This file contains the definitions and documentation for the
2 Address Sanitizer and Thread Sanitizer builtins used in the GNU compiler.
23a5b65a 3 Copyright (C) 2012-2014 Free Software Foundation, Inc.
0e668eaf
JJ
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_SANITIZER_BUILTIN (ENUM, NAME, TYPE, ATTRS)
24
25 See builtins.def for details.
26 The builtins are created by the C-family of FEs in c-family/c-common.c,
27 for other FEs by asan.c. */
28
29/* Address Sanitizer */
ef1b3fda 30DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_INIT, "__asan_init_v3",
0e668eaf 31 BT_FN_VOID, ATTR_NOTHROW_LEAF_LIST)
68a9738a
JJ
32/* Do not reorder the BUILT_IN_ASAN_REPORT* builtins, e.g. cfgcleanup.c
33 relies on this order. */
0e668eaf 34DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_REPORT_LOAD1, "__asan_report_load1",
bc77608b 35 BT_FN_VOID_PTR, ATTR_TMPURE_NORETURN_NOTHROW_LEAF_LIST)
0e668eaf 36DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_REPORT_LOAD2, "__asan_report_load2",
bc77608b 37 BT_FN_VOID_PTR, ATTR_TMPURE_NORETURN_NOTHROW_LEAF_LIST)
0e668eaf 38DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_REPORT_LOAD4, "__asan_report_load4",
bc77608b 39 BT_FN_VOID_PTR, ATTR_TMPURE_NORETURN_NOTHROW_LEAF_LIST)
0e668eaf 40DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_REPORT_LOAD8, "__asan_report_load8",
bc77608b 41 BT_FN_VOID_PTR, ATTR_TMPURE_NORETURN_NOTHROW_LEAF_LIST)
0e668eaf 42DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_REPORT_LOAD16, "__asan_report_load16",
bc77608b 43 BT_FN_VOID_PTR, ATTR_TMPURE_NORETURN_NOTHROW_LEAF_LIST)
0e668eaf 44DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_REPORT_STORE1, "__asan_report_store1",
bc77608b 45 BT_FN_VOID_PTR, ATTR_TMPURE_NORETURN_NOTHROW_LEAF_LIST)
0e668eaf 46DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_REPORT_STORE2, "__asan_report_store2",
bc77608b 47 BT_FN_VOID_PTR, ATTR_TMPURE_NORETURN_NOTHROW_LEAF_LIST)
0e668eaf 48DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_REPORT_STORE4, "__asan_report_store4",
bc77608b 49 BT_FN_VOID_PTR, ATTR_TMPURE_NORETURN_NOTHROW_LEAF_LIST)
0e668eaf 50DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_REPORT_STORE8, "__asan_report_store8",
bc77608b 51 BT_FN_VOID_PTR, ATTR_TMPURE_NORETURN_NOTHROW_LEAF_LIST)
0e668eaf 52DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_REPORT_STORE16, "__asan_report_store16",
bc77608b 53 BT_FN_VOID_PTR, ATTR_TMPURE_NORETURN_NOTHROW_LEAF_LIST)
0e668eaf
JJ
54DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_REGISTER_GLOBALS,
55 "__asan_register_globals",
56 BT_FN_VOID_PTR_PTRMODE, ATTR_NOTHROW_LEAF_LIST)
57DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_UNREGISTER_GLOBALS,
58 "__asan_unregister_globals",
59 BT_FN_VOID_PTR_PTRMODE, ATTR_NOTHROW_LEAF_LIST)
2b2571c9
JJ
60DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_HANDLE_NO_RETURN,
61 "__asan_handle_no_return",
bc77608b 62 BT_FN_VOID, ATTR_TMPURE_NOTHROW_LEAF_LIST)
59b36ecf
JJ
63DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_BEFORE_DYNAMIC_INIT,
64 "__asan_before_dynamic_init",
65 BT_FN_VOID_CONST_PTR, ATTR_NOTHROW_LEAF_LIST)
66DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_AFTER_DYNAMIC_INIT,
67 "__asan_after_dynamic_init",
68 BT_FN_VOID, ATTR_NOTHROW_LEAF_LIST)
0e668eaf
JJ
69
70/* Thread Sanitizer */
32b4b7f5
DV
71DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_INIT, "__tsan_init",
72 BT_FN_VOID, ATTR_NOTHROW_LEAF_LIST)
73DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_FUNC_ENTRY, "__tsan_func_entry",
74 BT_FN_VOID_PTR, ATTR_NOTHROW_LEAF_LIST)
75DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_FUNC_EXIT, "__tsan_func_exit",
76 BT_FN_VOID_PTR, ATTR_NOTHROW_LEAF_LIST)
77DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_VPTR_UPDATE, "__tsan_vptr_update",
78 BT_FN_VOID_PTR, ATTR_NOTHROW_LEAF_LIST)
0e668eaf 79DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_READ1, "__tsan_read1",
32b4b7f5 80 BT_FN_VOID_PTR, ATTR_NOTHROW_LEAF_LIST)
0e668eaf 81DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_READ2, "__tsan_read2",
32b4b7f5 82 BT_FN_VOID_PTR, ATTR_NOTHROW_LEAF_LIST)
0e668eaf 83DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_READ4, "__tsan_read4",
32b4b7f5 84 BT_FN_VOID_PTR, ATTR_NOTHROW_LEAF_LIST)
0e668eaf 85DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_READ8, "__tsan_read8",
32b4b7f5 86 BT_FN_VOID_PTR, ATTR_NOTHROW_LEAF_LIST)
0e668eaf 87DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_READ16, "__tsan_read16",
32b4b7f5 88 BT_FN_VOID_PTR, ATTR_NOTHROW_LEAF_LIST)
0e668eaf 89DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_WRITE1, "__tsan_write1",
32b4b7f5 90 BT_FN_VOID_PTR, ATTR_NOTHROW_LEAF_LIST)
0e668eaf 91DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_WRITE2, "__tsan_write2",
32b4b7f5 92 BT_FN_VOID_PTR, ATTR_NOTHROW_LEAF_LIST)
0e668eaf 93DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_WRITE4, "__tsan_write4",
32b4b7f5 94 BT_FN_VOID_PTR, ATTR_NOTHROW_LEAF_LIST)
0e668eaf 95DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_WRITE8, "__tsan_write8",
32b4b7f5 96 BT_FN_VOID_PTR, ATTR_NOTHROW_LEAF_LIST)
0e668eaf 97DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_WRITE16, "__tsan_write16",
32b4b7f5 98 BT_FN_VOID_PTR, ATTR_NOTHROW_LEAF_LIST)
c954bddd
JJ
99
100DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC8_LOAD,
101 "__tsan_atomic8_load",
102 BT_FN_I1_CONST_VPTR_INT, ATTR_NOTHROW_LEAF_LIST)
103DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC16_LOAD,
104 "__tsan_atomic16_load",
105 BT_FN_I2_CONST_VPTR_INT, ATTR_NOTHROW_LEAF_LIST)
106DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC32_LOAD,
107 "__tsan_atomic32_load",
108 BT_FN_I4_CONST_VPTR_INT, ATTR_NOTHROW_LEAF_LIST)
109DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC64_LOAD,
110 "__tsan_atomic64_load",
111 BT_FN_I8_CONST_VPTR_INT, ATTR_NOTHROW_LEAF_LIST)
112DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC128_LOAD,
113 "__tsan_atomic128_load",
114 BT_FN_I16_CONST_VPTR_INT, ATTR_NOTHROW_LEAF_LIST)
115
116DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC8_STORE,
117 "__tsan_atomic8_store",
118 BT_FN_VOID_VPTR_I1_INT, ATTR_NOTHROW_LEAF_LIST)
119DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC16_STORE,
120 "__tsan_atomic16_store",
121 BT_FN_VOID_VPTR_I2_INT, ATTR_NOTHROW_LEAF_LIST)
122DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC32_STORE,
123 "__tsan_atomic32_store",
124 BT_FN_VOID_VPTR_I4_INT, ATTR_NOTHROW_LEAF_LIST)
125DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC64_STORE,
126 "__tsan_atomic64_store",
127 BT_FN_VOID_VPTR_I8_INT, ATTR_NOTHROW_LEAF_LIST)
128DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC128_STORE,
129 "__tsan_atomic128_store",
130 BT_FN_VOID_VPTR_I16_INT, ATTR_NOTHROW_LEAF_LIST)
131
132DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC8_EXCHANGE,
133 "__tsan_atomic8_exchange",
134 BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROW_LEAF_LIST)
135DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC16_EXCHANGE,
136 "__tsan_atomic16_exchange",
137 BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROW_LEAF_LIST)
138DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC32_EXCHANGE,
139 "__tsan_atomic32_exchange",
140 BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROW_LEAF_LIST)
141DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC64_EXCHANGE,
142 "__tsan_atomic64_exchange",
143 BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROW_LEAF_LIST)
144DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC128_EXCHANGE,
145 "__tsan_atomic128_exchange",
146 BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROW_LEAF_LIST)
147
148DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC8_FETCH_ADD,
149 "__tsan_atomic8_fetch_add",
150 BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROW_LEAF_LIST)
151DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC16_FETCH_ADD,
152 "__tsan_atomic16_fetch_add",
153 BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROW_LEAF_LIST)
154DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC32_FETCH_ADD,
155 "__tsan_atomic32_fetch_add",
156 BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROW_LEAF_LIST)
157DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC64_FETCH_ADD,
158 "__tsan_atomic64_fetch_add",
159 BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROW_LEAF_LIST)
160DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC128_FETCH_ADD,
161 "__tsan_atomic128_fetch_add",
162 BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROW_LEAF_LIST)
163
164DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC8_FETCH_SUB,
165 "__tsan_atomic8_fetch_sub",
166 BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROW_LEAF_LIST)
167DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC16_FETCH_SUB,
168 "__tsan_atomic16_fetch_sub",
169 BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROW_LEAF_LIST)
170DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC32_FETCH_SUB,
171 "__tsan_atomic32_fetch_sub",
172 BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROW_LEAF_LIST)
173DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC64_FETCH_SUB,
174 "__tsan_atomic64_fetch_sub",
175 BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROW_LEAF_LIST)
176DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC128_FETCH_SUB,
177 "__tsan_atomic128_fetch_sub",
178 BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROW_LEAF_LIST)
179
180DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC8_FETCH_AND,
181 "__tsan_atomic8_fetch_and",
182 BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROW_LEAF_LIST)
183DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC16_FETCH_AND,
184 "__tsan_atomic16_fetch_and",
185 BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROW_LEAF_LIST)
186DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC32_FETCH_AND,
187 "__tsan_atomic32_fetch_and",
188 BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROW_LEAF_LIST)
189DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC64_FETCH_AND,
190 "__tsan_atomic64_fetch_and",
191 BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROW_LEAF_LIST)
192DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC128_FETCH_AND,
193 "__tsan_atomic128_fetch_and",
194 BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROW_LEAF_LIST)
195
196DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC8_FETCH_OR,
197 "__tsan_atomic8_fetch_or",
198 BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROW_LEAF_LIST)
199DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC16_FETCH_OR,
200 "__tsan_atomic16_fetch_or",
201 BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROW_LEAF_LIST)
202DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC32_FETCH_OR,
203 "__tsan_atomic32_fetch_or",
204 BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROW_LEAF_LIST)
205DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC64_FETCH_OR,
206 "__tsan_atomic64_fetch_or",
207 BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROW_LEAF_LIST)
208DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC128_FETCH_OR,
209 "__tsan_atomic128_fetch_or",
210 BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROW_LEAF_LIST)
211
212DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC8_FETCH_XOR,
213 "__tsan_atomic8_fetch_xor",
214 BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROW_LEAF_LIST)
215DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC16_FETCH_XOR,
216 "__tsan_atomic16_fetch_xor",
217 BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROW_LEAF_LIST)
218DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC32_FETCH_XOR,
219 "__tsan_atomic32_fetch_xor",
220 BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROW_LEAF_LIST)
221DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC64_FETCH_XOR,
222 "__tsan_atomic64_fetch_xor",
223 BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROW_LEAF_LIST)
224DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC128_FETCH_XOR,
225 "__tsan_atomic128_fetch_xor",
226 BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROW_LEAF_LIST)
227
228DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC8_FETCH_NAND,
229 "__tsan_atomic8_fetch_nand",
230 BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROW_LEAF_LIST)
231DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC16_FETCH_NAND,
232 "__tsan_atomic16_fetch_nand",
233 BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROW_LEAF_LIST)
234DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC32_FETCH_NAND,
235 "__tsan_atomic32_fetch_nand",
236 BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROW_LEAF_LIST)
237DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC64_FETCH_NAND,
238 "__tsan_atomic64_fetch_nand",
239 BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROW_LEAF_LIST)
240DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC128_FETCH_NAND,
241 "__tsan_atomic128_fetch_nand",
242 BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROW_LEAF_LIST)
243
244DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC8_COMPARE_EXCHANGE_STRONG,
245 "__tsan_atomic8_compare_exchange_strong",
246 BT_FN_BOOL_VPTR_PTR_I1_INT_INT,
247 ATTR_NOTHROW_LEAF_LIST)
248DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC16_COMPARE_EXCHANGE_STRONG,
249 "__tsan_atomic16_compare_exchange_strong",
250 BT_FN_BOOL_VPTR_PTR_I2_INT_INT,
251 ATTR_NOTHROW_LEAF_LIST)
252DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC32_COMPARE_EXCHANGE_STRONG,
253 "__tsan_atomic32_compare_exchange_strong",
254 BT_FN_BOOL_VPTR_PTR_I4_INT_INT,
255 ATTR_NOTHROW_LEAF_LIST)
256DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC64_COMPARE_EXCHANGE_STRONG,
257 "__tsan_atomic64_compare_exchange_strong",
258 BT_FN_BOOL_VPTR_PTR_I8_INT_INT,
259 ATTR_NOTHROW_LEAF_LIST)
260DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC128_COMPARE_EXCHANGE_STRONG,
261 "__tsan_atomic128_compare_exchange_strong",
262 BT_FN_BOOL_VPTR_PTR_I16_INT_INT,
263 ATTR_NOTHROW_LEAF_LIST)
264
265DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC8_COMPARE_EXCHANGE_WEAK,
266 "__tsan_atomic8_compare_exchange_weak",
267 BT_FN_BOOL_VPTR_PTR_I1_INT_INT,
268 ATTR_NOTHROW_LEAF_LIST)
269DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC16_COMPARE_EXCHANGE_WEAK,
270 "__tsan_atomic16_compare_exchange_weak",
271 BT_FN_BOOL_VPTR_PTR_I2_INT_INT,
272 ATTR_NOTHROW_LEAF_LIST)
273DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC32_COMPARE_EXCHANGE_WEAK,
274 "__tsan_atomic32_compare_exchange_weak",
275 BT_FN_BOOL_VPTR_PTR_I4_INT_INT,
276 ATTR_NOTHROW_LEAF_LIST)
277DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC64_COMPARE_EXCHANGE_WEAK,
278 "__tsan_atomic64_compare_exchange_weak",
279 BT_FN_BOOL_VPTR_PTR_I8_INT_INT,
280 ATTR_NOTHROW_LEAF_LIST)
281DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC128_COMPARE_EXCHANGE_WEAK,
282 "__tsan_atomic128_compare_exchange_weak",
283 BT_FN_BOOL_VPTR_PTR_I16_INT_INT,
284 ATTR_NOTHROW_LEAF_LIST)
285
286DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC_THREAD_FENCE,
287 "__tsan_atomic_thread_fence",
288 BT_FN_VOID_INT, ATTR_NOTHROW_LEAF_LIST)
289DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC_SIGNAL_FENCE,
290 "__tsan_atomic_signal_fence",
291 BT_FN_VOID_INT, ATTR_NOTHROW_LEAF_LIST)
de5a5fa1
MP
292
293/* Undefined Behavior Sanitizer */
294DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_DIVREM_OVERFLOW,
295 "__ubsan_handle_divrem_overflow",
296 BT_FN_VOID_PTR_PTR_PTR,
297 ATTR_COLD_NOTHROW_LEAF_LIST)
298DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_SHIFT_OUT_OF_BOUNDS,
299 "__ubsan_handle_shift_out_of_bounds",
300 BT_FN_VOID_PTR_PTR_PTR,
301 ATTR_COLD_NOTHROW_LEAF_LIST)
302DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_BUILTIN_UNREACHABLE,
303 "__ubsan_handle_builtin_unreachable",
304 BT_FN_VOID_PTR,
305 ATTR_COLD_NORETURN_NOTHROW_LEAF_LIST)
0a508bb6
JJ
306DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_MISSING_RETURN,
307 "__ubsan_handle_missing_return",
308 BT_FN_VOID_PTR,
309 ATTR_NORETURN_NOTHROW_LEAF_LIST)
b906f4ca
MP
310DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_VLA_BOUND_NOT_POSITIVE,
311 "__ubsan_handle_vla_bound_not_positive",
312 BT_FN_VOID_PTR_PTR,
313 ATTR_COLD_NOTHROW_LEAF_LIST)
b9a55b13
MP
314DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH,
315 "__ubsan_handle_type_mismatch",
316 BT_FN_VOID_PTR_PTR,
317 ATTR_COLD_NOTHROW_LEAF_LIST)
31e071ae
MP
318DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_ADD_OVERFLOW,
319 "__ubsan_handle_add_overflow",
320 BT_FN_VOID_PTR_PTR_PTR,
321 ATTR_COLD_NOTHROW_LEAF_LIST)
322DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_SUB_OVERFLOW,
323 "__ubsan_handle_sub_overflow",
324 BT_FN_VOID_PTR_PTR_PTR,
325 ATTR_COLD_NOTHROW_LEAF_LIST)
326DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_MUL_OVERFLOW,
327 "__ubsan_handle_mul_overflow",
328 BT_FN_VOID_PTR_PTR_PTR,
329 ATTR_COLD_NOTHROW_LEAF_LIST)
330DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_NEGATE_OVERFLOW,
331 "__ubsan_handle_negate_overflow",
332 BT_FN_VOID_PTR_PTR,
333 ATTR_COLD_NOTHROW_LEAF_LIST)
ac0ff9f2
JJ
334DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_LOAD_INVALID_VALUE,
335 "__ubsan_handle_load_invalid_value",
336 BT_FN_VOID_PTR_PTR,
337 ATTR_COLD_NOTHROW_LEAF_LIST)