gcc:
[official-gcc.git] / gcc / builtins.def
bloba45641cf0ae5f5f1467186fb1769321f504e627b
1 /* This file contains the definitions and documentation for the
2 builtins used in the GNU compiler.
3 Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
5 This file is part of GCC.
7 GCC is free software; you can redistribute it and/or modify it under
8 the terms of the GNU General Public License as published by the Free
9 Software Foundation; either version 2, or (at your option) any later
10 version.
12 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 for more details.
17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING. If not, write to the Free
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA
20 02111-1307, USA. */
22 /* Before including this file, you should define a macro:
24 DEF_BUILTIN (ENUM, NAME, CLASS, TYPE, LIBTYPE, BOTH_P,
25 FALLBACK_P, NONANSI_P, ATTRS, IMPLICIT)
27 This macro will be called once for each builtin function. The
28 ENUM will be of type `enum built_in_function', and will indicate
29 which builtin function is being processed. The NAME of the builtin
30 function (which will always start with `__builtin_') is a string
31 literal. The CLASS is of type `enum built_in_class' and indicates
32 what kind of builtin is being processed.
34 Some builtins are actually two separate functions. For example,
35 for `strcmp' there are two builtin functions; `__builtin_strcmp'
36 and `strcmp' itself. Both behave identically. Other builtins
37 define only the `__builtin' variant. If BOTH_P is TRUE, then this
38 builtin has both variants; otherwise, it is has only the first
39 variant.
41 TYPE indicates the type of the function. The symbols correspond to
42 enumerals from builtin-types.def. If BOTH_P is true, then LIBTYPE
43 is the type of the non-`__builtin_' variant. Otherwise, LIBTYPE
44 should be ignored.
46 If FALLBACK_P is true then, if for some reason, the compiler cannot
47 expand the builtin function directly, it will call the
48 corresponding library function (which does not have the
49 `__builtin_' prefix.
51 If NONANSI_P is true, then the non-`__builtin_' variant is not an
52 ANSI/ISO library function, and so we should pretend it does not
53 exist when compiling in ANSI conformant mode.
55 ATTRs is an attribute list as defined in builtin-attrs.def that
56 describes the attributes of this builtin function.
58 IMPLICIT specifies condition when the builtin can be produced by
59 compiler. For instance C90 reserves floorf function, but does not
60 define it's meaning. When user uses floorf we may assume that the
61 floorf has the meaning we expect, but we can't produce floorf by
62 simplifying floor((double)float) since the runtime need not implement
63 it. */
65 /* A GCC builtin (like __builtin_saveregs) is provided by the
66 compiler, but does not correspond to a function in the standard
67 library. */
68 #undef DEF_GCC_BUILTIN
69 #define DEF_GCC_BUILTIN(ENUM, NAME, TYPE, ATTRS) \
70 DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, TYPE, BT_LAST, \
71 false, false, false, ATTRS, true)
74 /* A fallback builtin is a builtin (like __builtin_puts) that falls
75 back to the corresopnding library function if necessary -- but
76 for which we should not introduce the non-`__builtin' variant of
77 the name. */
78 #undef DEF_FALLBACK_BUILTIN
79 #define DEF_FALLBACK_BUILTIN(ENUM, NAME, TYPE, ATTRS) \
80 DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, TYPE, TYPE, \
81 false, true, false, ATTRS, true)
83 /* Like DEF_FALLBACK_BUILTIN, except that the function is not one that
84 is specified by ANSI/ISO C. So, when we're being fully conformant
85 we ignore the version of these builtins that does not begin with
86 __builtin. */
87 #undef DEF_EXT_FALLBACK_BUILTIN
88 #define DEF_EXT_FALLBACK_BUILTIN(ENUM, NAME, TYPE, ATTRS) \
89 DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, TYPE, TYPE, \
90 false, true, true, ATTRS, true)
92 /* A library builtin (like __builtin_strchr) is a builtin equivalent
93 of an ANSI/ISO standard library function. In addition to the
94 `__builtin' version, we will create an ordinary version (e.g,
95 `strchr') as well. If we cannot compute the answer using the
96 builtin function, we will fall back to the standard library
97 version. */
98 #undef DEF_LIB_BUILTIN
99 #define DEF_LIB_BUILTIN(ENUM, NAME, TYPE, ATTRS) \
100 DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, TYPE, TYPE, \
101 true, true, false, ATTRS, true)
103 /* Like DEF_LIB_BUILTIN, except that the function is not one that is
104 specified by ANSI/ISO C. So, when we're being fully conformant we
105 ignore the version of these builtins that does not begin with
106 __builtin. */
107 #undef DEF_EXT_LIB_BUILTIN
108 #define DEF_EXT_LIB_BUILTIN(ENUM, NAME, TYPE, ATTRS) \
109 DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, TYPE, TYPE, \
110 true, true, true, ATTRS, false)
112 /* Like DEF_LIB_BUILTIN, except that the function is only a part of
113 the standard in C99 or above. */
114 #undef DEF_C99_BUILTIN
115 #define DEF_C99_BUILTIN(ENUM, NAME, TYPE, ATTRS) \
116 DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, TYPE, TYPE, \
117 true, true, !flag_isoc99, ATTRS, TARGET_C99_FUNCTIONS)
119 /* Builtin that is specified by C99 and C90 reserve the name for future use.
120 We can still recognize the builtin in C90 mode but we can't produce it
121 implicitly. */
122 #undef DEF_C99_C90RES_BUILTIN
123 #define DEF_C99_C90RES_BUILTIN(ENUM, NAME, TYPE, ATTRS) \
124 DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, TYPE, TYPE, \
125 true, true, !flag_isoc99, ATTRS, TARGET_C99_FUNCTIONS)
127 /* Like DEF_LIB_BUILTIN, except that the function is expanded in the
128 front-end. */
129 #undef DEF_FRONT_END_LIB_BUILTIN
130 #define DEF_FRONT_END_LIB_BUILTIN(ENUM, NAME, TYPE, ATTRS) \
131 DEF_BUILTIN (ENUM, NAME, BUILT_IN_FRONTEND, TYPE, TYPE, \
132 true, true, false, ATTRS, true)
134 /* Like DEF_FRONT_END_LIB_BUILTIN, except that the function is not one
135 that is specified by ANSI/ISO C. So, when we're being fully
136 conformant we ignore the version of these builtins that does not
137 begin with __builtin. */
138 #undef DEF_EXT_FRONT_END_LIB_BUILTIN
139 #define DEF_EXT_FRONT_END_LIB_BUILTIN(ENUM, NAME, TYPE, ATTRS) \
140 DEF_BUILTIN (ENUM, NAME, BUILT_IN_FRONTEND, TYPE, TYPE, \
141 true, true, true, ATTRS, true)
143 /* If SMALL_STACK is defined, then `alloca' is only defined in its
144 `__builtin' form. */
145 #if SMALL_STACK
146 DEF_FALLBACK_BUILTIN(BUILT_IN_ALLOCA,
147 "__builtin_alloca",
148 BT_FN_PTR_SIZE,
149 ATTR_MALLOC_NOTHROW_LIST)
150 #else
151 DEF_EXT_LIB_BUILTIN(BUILT_IN_ALLOCA,
152 "__builtin_alloca",
153 BT_FN_PTR_SIZE,
154 ATTR_MALLOC_NOTHROW_LIST)
155 #endif
157 DEF_LIB_BUILTIN(BUILT_IN_ABS,
158 "__builtin_abs",
159 BT_FN_INT_INT,
160 ATTR_CONST_NOTHROW_LIST)
161 DEF_LIB_BUILTIN(BUILT_IN_LABS,
162 "__builtin_labs",
163 BT_FN_LONG_LONG,
164 ATTR_CONST_NOTHROW_LIST)
166 DEF_LIB_BUILTIN(BUILT_IN_FABS,
167 "__builtin_fabs",
168 BT_FN_DOUBLE_DOUBLE,
169 ATTR_CONST_NOTHROW_LIST)
170 DEF_C99_C90RES_BUILTIN(BUILT_IN_FABSF,
171 "__builtin_fabsf",
172 BT_FN_FLOAT_FLOAT,
173 ATTR_CONST_NOTHROW_LIST)
174 DEF_C99_C90RES_BUILTIN(BUILT_IN_FABSL,
175 "__builtin_fabsl",
176 BT_FN_LONG_DOUBLE_LONG_DOUBLE,
177 ATTR_CONST_NOTHROW_LIST)
179 DEF_LIB_BUILTIN(BUILT_IN_FLOOR,
180 "__builtin_floor",
181 BT_FN_DOUBLE_DOUBLE,
182 ATTR_CONST_NOTHROW_LIST)
183 DEF_C99_C90RES_BUILTIN(BUILT_IN_FLOORF,
184 "__builtin_floorf",
185 BT_FN_FLOAT_FLOAT,
186 ATTR_CONST_NOTHROW_LIST)
187 DEF_C99_C90RES_BUILTIN(BUILT_IN_FLOORL,
188 "__builtin_floorl",
189 BT_FN_LONG_DOUBLE_LONG_DOUBLE,
190 ATTR_CONST_NOTHROW_LIST)
192 DEF_LIB_BUILTIN(BUILT_IN_CEIL,
193 "__builtin_ceil",
194 BT_FN_DOUBLE_DOUBLE,
195 ATTR_CONST_NOTHROW_LIST)
196 DEF_C99_C90RES_BUILTIN(BUILT_IN_CEILF,
197 "__builtin_ceilf",
198 BT_FN_FLOAT_FLOAT,
199 ATTR_CONST_NOTHROW_LIST)
200 DEF_C99_C90RES_BUILTIN(BUILT_IN_CEILL,
201 "__builtin_ceill",
202 BT_FN_LONG_DOUBLE_LONG_DOUBLE,
203 ATTR_CONST_NOTHROW_LIST)
205 DEF_C99_BUILTIN(BUILT_IN_ROUND,
206 "__builtin_round",
207 BT_FN_DOUBLE_DOUBLE,
208 ATTR_CONST_NOTHROW_LIST)
209 DEF_C99_BUILTIN(BUILT_IN_ROUNDF,
210 "__builtin_roundf",
211 BT_FN_FLOAT_FLOAT,
212 ATTR_CONST_NOTHROW_LIST)
213 DEF_C99_BUILTIN(BUILT_IN_ROUNDL,
214 "__builtin_roundl",
215 BT_FN_LONG_DOUBLE_LONG_DOUBLE,
216 ATTR_CONST_NOTHROW_LIST)
218 DEF_C99_BUILTIN(BUILT_IN_TRUNC,
219 "__builtin_trunc",
220 BT_FN_DOUBLE_DOUBLE,
221 ATTR_CONST_NOTHROW_LIST)
222 DEF_C99_BUILTIN(BUILT_IN_TRUNCF,
223 "__builtin_truncf",
224 BT_FN_FLOAT_FLOAT,
225 ATTR_CONST_NOTHROW_LIST)
226 DEF_C99_BUILTIN(BUILT_IN_TRUNCL,
227 "__builtin_truncl",
228 BT_FN_LONG_DOUBLE_LONG_DOUBLE,
229 ATTR_CONST_NOTHROW_LIST)
231 DEF_C99_BUILTIN(BUILT_IN_NEARBYINT,
232 "__builtin_nearbyint",
233 BT_FN_DOUBLE_DOUBLE,
234 ATTR_CONST_NOTHROW_LIST)
235 DEF_C99_BUILTIN(BUILT_IN_NEARBYINTF,
236 "__builtin_nearbyintf",
237 BT_FN_FLOAT_FLOAT,
238 ATTR_CONST_NOTHROW_LIST)
239 DEF_C99_BUILTIN(BUILT_IN_NEARBYINTL,
240 "__builtin_nearbyintl",
241 BT_FN_LONG_DOUBLE_LONG_DOUBLE,
242 ATTR_CONST_NOTHROW_LIST)
244 DEF_C99_BUILTIN(BUILT_IN_LLABS,
245 "__builtin_llabs",
246 BT_FN_LONGLONG_LONGLONG,
247 ATTR_CONST_NOTHROW_LIST)
248 DEF_C99_BUILTIN(BUILT_IN_IMAXABS,
249 "__builtin_imaxabs",
250 BT_FN_INTMAX_INTMAX,
251 ATTR_CONST_NOTHROW_LIST)
252 DEF_C99_BUILTIN(BUILT_IN_CONJ,
253 "__builtin_conj",
254 BT_FN_COMPLEX_DOUBLE_COMPLEX_DOUBLE,
255 ATTR_CONST_NOTHROW_LIST)
256 DEF_C99_BUILTIN(BUILT_IN_CONJF,
257 "__builtin_conjf",
258 BT_FN_COMPLEX_FLOAT_COMPLEX_FLOAT,
259 ATTR_CONST_NOTHROW_LIST)
260 DEF_C99_BUILTIN(BUILT_IN_CONJL,
261 "__builtin_conjl",
262 BT_FN_COMPLEX_LONG_DOUBLE_COMPLEX_LONG_DOUBLE,
263 ATTR_CONST_NOTHROW_LIST)
264 DEF_C99_BUILTIN(BUILT_IN_CREAL,
265 "__builtin_creal",
266 BT_FN_DOUBLE_COMPLEX_DOUBLE,
267 ATTR_CONST_NOTHROW_LIST)
268 DEF_C99_BUILTIN(BUILT_IN_CREALF,
269 "__builtin_crealf",
270 BT_FN_FLOAT_COMPLEX_FLOAT,
271 ATTR_CONST_NOTHROW_LIST)
272 DEF_C99_BUILTIN(BUILT_IN_CREALL,
273 "__builtin_creall",
274 BT_FN_LONG_DOUBLE_COMPLEX_LONG_DOUBLE,
275 ATTR_CONST_NOTHROW_LIST)
276 DEF_C99_BUILTIN(BUILT_IN_CIMAG,
277 "__builtin_cimag",
278 BT_FN_DOUBLE_COMPLEX_DOUBLE,
279 ATTR_CONST_NOTHROW_LIST)
280 DEF_C99_BUILTIN(BUILT_IN_CIMAGF,
281 "__builtin_cimagf",
282 BT_FN_FLOAT_COMPLEX_FLOAT,
283 ATTR_CONST_NOTHROW_LIST)
284 DEF_C99_BUILTIN(BUILT_IN_CIMAGL,
285 "__builtin_cimagl",
286 BT_FN_LONG_DOUBLE_COMPLEX_LONG_DOUBLE,
287 ATTR_CONST_NOTHROW_LIST)
289 /* The system prototypes for `bzero', 'bcopy' and `bcmp' functions
290 have many variations, so don't specify parameters to avoid
291 conflicts. The expand_* functions check the argument types anyway.
292 In addition, these functions have traditionally accepted NULL
293 pointers when the length parameter is zero, so don't apply
294 attribute "nonnull". */
295 DEF_BUILTIN (BUILT_IN_BZERO,
296 "__builtin_bzero",
297 BUILT_IN_NORMAL,
298 BT_FN_VOID_PTR_SIZE,
299 BT_FN_VOID_VAR,
300 true, true, true,
301 ATTR_NOTHROW_LIST, false)
302 DEF_BUILTIN (BUILT_IN_BCOPY,
303 "__builtin_bcopy",
304 BUILT_IN_NORMAL,
305 BT_FN_VOID_CONST_PTR_PTR_SIZE,
306 BT_FN_VOID_VAR,
307 true, true, true,
308 ATTR_NOTHROW_LIST, false)
309 DEF_BUILTIN (BUILT_IN_BCMP,
310 "__builtin_bcmp",
311 BUILT_IN_NORMAL,
312 BT_FN_INT_CONST_PTR_CONST_PTR_SIZE,
313 BT_FN_INT_VAR,
314 true, true, true,
315 ATTR_PURE_NOTHROW_LIST, false)
317 DEF_EXT_LIB_BUILTIN(BUILT_IN_FFS,
318 "__builtin_ffs",
319 BT_FN_INT_INT,
320 ATTR_CONST_NOTHROW_LIST)
321 DEF_GCC_BUILTIN(BUILT_IN_CLZ,
322 "__builtin_clz",
323 BT_FN_INT_INT,
324 ATTR_CONST_NOTHROW_LIST)
325 DEF_GCC_BUILTIN(BUILT_IN_CTZ,
326 "__builtin_ctz",
327 BT_FN_INT_INT,
328 ATTR_CONST_NOTHROW_LIST)
329 DEF_GCC_BUILTIN(BUILT_IN_POPCOUNT,
330 "__builtin_popcount",
331 BT_FN_INT_INT,
332 ATTR_CONST_NOTHROW_LIST)
333 DEF_GCC_BUILTIN(BUILT_IN_PARITY,
334 "__builtin_parity",
335 BT_FN_INT_INT,
336 ATTR_CONST_NOTHROW_LIST)
338 DEF_GCC_BUILTIN(BUILT_IN_FFSL,
339 "__builtin_ffsl",
340 BT_FN_INT_LONG,
341 ATTR_CONST_NOTHROW_LIST)
342 DEF_GCC_BUILTIN(BUILT_IN_CLZL,
343 "__builtin_clzl",
344 BT_FN_INT_LONG,
345 ATTR_CONST_NOTHROW_LIST)
346 DEF_GCC_BUILTIN(BUILT_IN_CTZL,
347 "__builtin_ctzl",
348 BT_FN_INT_LONG,
349 ATTR_CONST_NOTHROW_LIST)
350 DEF_GCC_BUILTIN(BUILT_IN_POPCOUNTL,
351 "__builtin_popcountl",
352 BT_FN_INT_LONG,
353 ATTR_CONST_NOTHROW_LIST)
354 DEF_GCC_BUILTIN(BUILT_IN_PARITYL,
355 "__builtin_parityl",
356 BT_FN_INT_LONG,
357 ATTR_CONST_NOTHROW_LIST)
359 DEF_EXT_LIB_BUILTIN(BUILT_IN_FFSLL,
360 "__builtin_ffsll",
361 BT_FN_INT_LONGLONG,
362 ATTR_CONST_NOTHROW_LIST)
363 DEF_GCC_BUILTIN(BUILT_IN_CLZLL,
364 "__builtin_clzll",
365 BT_FN_INT_LONGLONG,
366 ATTR_CONST_NOTHROW_LIST)
367 DEF_GCC_BUILTIN(BUILT_IN_CTZLL,
368 "__builtin_ctzll",
369 BT_FN_INT_LONGLONG,
370 ATTR_CONST_NOTHROW_LIST)
371 DEF_GCC_BUILTIN(BUILT_IN_POPCOUNTLL,
372 "__builtin_popcountll",
373 BT_FN_INT_LONGLONG,
374 ATTR_CONST_NOTHROW_LIST)
375 DEF_GCC_BUILTIN(BUILT_IN_PARITYLL,
376 "__builtin_parityll",
377 BT_FN_INT_LONGLONG,
378 ATTR_CONST_NOTHROW_LIST)
380 DEF_EXT_LIB_BUILTIN(BUILT_IN_INDEX,
381 "__builtin_index",
382 BT_FN_STRING_CONST_STRING_INT,
383 ATTR_PURE_NOTHROW_NONNULL_1)
384 DEF_EXT_LIB_BUILTIN(BUILT_IN_RINDEX,
385 "__builtin_rindex",
386 BT_FN_STRING_CONST_STRING_INT,
387 ATTR_PURE_NOTHROW_NONNULL_1)
389 DEF_LIB_BUILTIN(BUILT_IN_MEMCPY,
390 "__builtin_memcpy",
391 BT_FN_PTR_PTR_CONST_PTR_SIZE,
392 ATTR_NOTHROW_NONNULL_1_2)
393 DEF_LIB_BUILTIN(BUILT_IN_MEMMOVE,
394 "__builtin_memmove",
395 BT_FN_PTR_PTR_CONST_PTR_SIZE,
396 ATTR_NOTHROW_NONNULL_1_2)
397 DEF_LIB_BUILTIN(BUILT_IN_MEMCMP,
398 "__builtin_memcmp",
399 BT_FN_INT_CONST_PTR_CONST_PTR_SIZE,
400 ATTR_PURE_NOTHROW_NONNULL_1_2)
401 DEF_LIB_BUILTIN(BUILT_IN_MEMSET,
402 "__builtin_memset",
403 BT_FN_PTR_PTR_INT_SIZE,
404 ATTR_NOTHROW_NONNULL_1)
405 DEF_EXT_LIB_BUILTIN(BUILT_IN_MEMPCPY,
406 "__builtin_mempcpy",
407 BT_FN_PTR_PTR_CONST_PTR_SIZE,
408 ATTR_NOTHROW_NONNULL_1_2)
410 DEF_LIB_BUILTIN(BUILT_IN_STRCAT,
411 "__builtin_strcat",
412 BT_FN_STRING_STRING_CONST_STRING,
413 ATTR_NOTHROW_NONNULL_1_2)
414 DEF_LIB_BUILTIN(BUILT_IN_STRNCAT,
415 "__builtin_strncat",
416 BT_FN_STRING_STRING_CONST_STRING_SIZE,
417 ATTR_NOTHROW_NONNULL_1_2)
418 DEF_EXT_LIB_BUILTIN(BUILT_IN_STPCPY,
419 "__builtin_stpcpy",
420 BT_FN_STRING_STRING_CONST_STRING,
421 ATTR_NOTHROW_NONNULL_1_2)
422 DEF_LIB_BUILTIN(BUILT_IN_STRCPY,
423 "__builtin_strcpy",
424 BT_FN_STRING_STRING_CONST_STRING,
425 ATTR_NOTHROW_NONNULL_1_2)
426 DEF_LIB_BUILTIN(BUILT_IN_STRNCPY,
427 "__builtin_strncpy",
428 BT_FN_STRING_STRING_CONST_STRING_SIZE,
429 ATTR_NOTHROW_NONNULL_1_2)
430 DEF_LIB_BUILTIN(BUILT_IN_STRCMP,
431 "__builtin_strcmp",
432 BT_FN_INT_CONST_STRING_CONST_STRING,
433 ATTR_PURE_NOTHROW_NONNULL_1_2)
434 DEF_LIB_BUILTIN(BUILT_IN_STRNCMP,
435 "__builtin_strncmp",
436 BT_FN_INT_CONST_STRING_CONST_STRING_SIZE,
437 ATTR_PURE_NOTHROW_NONNULL_1_2)
438 DEF_LIB_BUILTIN(BUILT_IN_STRLEN,
439 "__builtin_strlen",
440 BT_FN_SIZE_CONST_STRING,
441 ATTR_PURE_NOTHROW_NONNULL_1)
442 DEF_LIB_BUILTIN(BUILT_IN_STRSTR,
443 "__builtin_strstr",
444 BT_FN_STRING_CONST_STRING_CONST_STRING,
445 ATTR_PURE_NOTHROW_NONNULL_1_2)
446 DEF_LIB_BUILTIN(BUILT_IN_STRPBRK,
447 "__builtin_strpbrk",
448 BT_FN_STRING_CONST_STRING_CONST_STRING,
449 ATTR_PURE_NOTHROW_NONNULL_1_2)
450 DEF_LIB_BUILTIN(BUILT_IN_STRSPN,
451 "__builtin_strspn",
452 BT_FN_SIZE_CONST_STRING_CONST_STRING,
453 ATTR_PURE_NOTHROW_NONNULL_1_2)
454 DEF_LIB_BUILTIN(BUILT_IN_STRCSPN,
455 "__builtin_strcspn",
456 BT_FN_SIZE_CONST_STRING_CONST_STRING,
457 ATTR_PURE_NOTHROW_NONNULL_1_2)
458 DEF_LIB_BUILTIN(BUILT_IN_STRCHR,
459 "__builtin_strchr",
460 BT_FN_STRING_CONST_STRING_INT,
461 ATTR_PURE_NOTHROW_NONNULL_1)
462 DEF_LIB_BUILTIN(BUILT_IN_STRRCHR,
463 "__builtin_strrchr",
464 BT_FN_STRING_CONST_STRING_INT,
465 ATTR_PURE_NOTHROW_NONNULL_1)
467 DEF_LIB_BUILTIN(BUILT_IN_SQRT,
468 "__builtin_sqrt",
469 BT_FN_DOUBLE_DOUBLE,
470 flag_errno_math ? ATTR_NOTHROW_LIST
471 : (flag_unsafe_math_optimizations
472 ? ATTR_CONST_NOTHROW_LIST
473 : ATTR_PURE_NOTHROW_LIST))
474 DEF_LIB_BUILTIN(BUILT_IN_SIN,
475 "__builtin_sin",
476 BT_FN_DOUBLE_DOUBLE,
477 flag_unsafe_math_optimizations ? ATTR_CONST_NOTHROW_LIST
478 : ATTR_PURE_NOTHROW_LIST)
479 DEF_LIB_BUILTIN(BUILT_IN_COS,
480 "__builtin_cos",
481 BT_FN_DOUBLE_DOUBLE,
482 flag_unsafe_math_optimizations ? ATTR_CONST_NOTHROW_LIST
483 : ATTR_PURE_NOTHROW_LIST)
484 DEF_LIB_BUILTIN(BUILT_IN_EXP,
485 "__builtin_exp",
486 BT_FN_DOUBLE_DOUBLE,
487 flag_errno_math ? ATTR_NOTHROW_LIST
488 : (flag_unsafe_math_optimizations
489 ? ATTR_CONST_NOTHROW_LIST
490 : ATTR_PURE_NOTHROW_LIST))
491 DEF_LIB_BUILTIN(BUILT_IN_LOG,
492 "__builtin_log",
493 BT_FN_DOUBLE_DOUBLE,
494 flag_errno_math ? ATTR_NOTHROW_LIST
495 : (flag_unsafe_math_optimizations
496 ? ATTR_CONST_NOTHROW_LIST
497 : ATTR_PURE_NOTHROW_LIST))
498 DEF_LIB_BUILTIN(BUILT_IN_POW,
499 "__builtin_pow",
500 BT_FN_DOUBLE_DOUBLE_DOUBLE,
501 flag_errno_math ? ATTR_NOTHROW_LIST
502 : (flag_unsafe_math_optimizations
503 ? ATTR_CONST_NOTHROW_LIST
504 : ATTR_PURE_NOTHROW_LIST))
505 DEF_LIB_BUILTIN(BUILT_IN_ATAN2,
506 "__builtin_atan2",
507 BT_FN_DOUBLE_DOUBLE_DOUBLE,
508 flag_errno_math ? ATTR_NOTHROW_LIST
509 : (flag_unsafe_math_optimizations
510 ? ATTR_CONST_NOTHROW_LIST
511 : ATTR_PURE_NOTHROW_LIST))
512 DEF_LIB_BUILTIN(BUILT_IN_FMOD,
513 "__builtin_fmod",
514 BT_FN_DOUBLE_DOUBLE_DOUBLE,
515 flag_errno_math ? ATTR_NOTHROW_LIST
516 : (flag_unsafe_math_optimizations
517 ? ATTR_CONST_NOTHROW_LIST
518 : ATTR_PURE_NOTHROW_LIST))
519 DEF_C99_C90RES_BUILTIN(BUILT_IN_SQRTF,
520 "__builtin_sqrtf",
521 BT_FN_FLOAT_FLOAT,
522 flag_errno_math ? ATTR_NOTHROW_LIST
523 : (flag_unsafe_math_optimizations
524 ? ATTR_CONST_NOTHROW_LIST
525 : ATTR_PURE_NOTHROW_LIST))
526 DEF_C99_C90RES_BUILTIN(BUILT_IN_SINF,
527 "__builtin_sinf",
528 BT_FN_FLOAT_FLOAT,
529 flag_unsafe_math_optimizations ? ATTR_CONST_NOTHROW_LIST
530 : ATTR_PURE_NOTHROW_LIST)
531 DEF_C99_C90RES_BUILTIN(BUILT_IN_COSF,
532 "__builtin_cosf",
533 BT_FN_FLOAT_FLOAT,
534 flag_unsafe_math_optimizations ? ATTR_CONST_NOTHROW_LIST
535 : ATTR_PURE_NOTHROW_LIST)
536 DEF_C99_C90RES_BUILTIN(BUILT_IN_EXPF,
537 "__builtin_expf",
538 BT_FN_FLOAT_FLOAT,
539 flag_errno_math ? ATTR_NOTHROW_LIST
540 : (flag_unsafe_math_optimizations
541 ? ATTR_CONST_NOTHROW_LIST
542 : ATTR_PURE_NOTHROW_LIST))
543 DEF_C99_C90RES_BUILTIN(BUILT_IN_LOGF,
544 "__builtin_logf",
545 BT_FN_FLOAT_FLOAT,
546 flag_errno_math ? ATTR_NOTHROW_LIST
547 : (flag_unsafe_math_optimizations
548 ? ATTR_CONST_NOTHROW_LIST
549 : ATTR_PURE_NOTHROW_LIST))
550 DEF_C99_C90RES_BUILTIN(BUILT_IN_POWF,
551 "__builtin_powf",
552 BT_FN_FLOAT_FLOAT_FLOAT,
553 flag_errno_math ? ATTR_NOTHROW_LIST
554 : (flag_unsafe_math_optimizations
555 ? ATTR_CONST_NOTHROW_LIST
556 : ATTR_PURE_NOTHROW_LIST))
557 DEF_C99_C90RES_BUILTIN(BUILT_IN_ATAN2F,
558 "__builtin_atan2f",
559 BT_FN_FLOAT_FLOAT_FLOAT,
560 flag_errno_math ? ATTR_NOTHROW_LIST
561 : (flag_unsafe_math_optimizations
562 ? ATTR_CONST_NOTHROW_LIST
563 : ATTR_PURE_NOTHROW_LIST))
564 DEF_C99_C90RES_BUILTIN(BUILT_IN_FMODF,
565 "__builtin_fmodf",
566 BT_FN_FLOAT_FLOAT_FLOAT,
567 flag_errno_math ? ATTR_NOTHROW_LIST
568 : (flag_unsafe_math_optimizations
569 ? ATTR_CONST_NOTHROW_LIST
570 : ATTR_PURE_NOTHROW_LIST))
571 DEF_C99_C90RES_BUILTIN(BUILT_IN_SQRTL,
572 "__builtin_sqrtl",
573 BT_FN_LONG_DOUBLE_LONG_DOUBLE,
574 flag_errno_math ? ATTR_NOTHROW_LIST
575 : (flag_unsafe_math_optimizations
576 ? ATTR_CONST_NOTHROW_LIST
577 : ATTR_PURE_NOTHROW_LIST))
578 DEF_C99_C90RES_BUILTIN(BUILT_IN_SINL,
579 "__builtin_sinl",
580 BT_FN_LONG_DOUBLE_LONG_DOUBLE,
581 flag_unsafe_math_optimizations ? ATTR_CONST_NOTHROW_LIST
582 : ATTR_PURE_NOTHROW_LIST)
583 DEF_C99_C90RES_BUILTIN(BUILT_IN_COSL,
584 "__builtin_cosl",
585 BT_FN_LONG_DOUBLE_LONG_DOUBLE,
586 flag_unsafe_math_optimizations ? ATTR_CONST_NOTHROW_LIST
587 : ATTR_PURE_NOTHROW_LIST)
588 DEF_C99_C90RES_BUILTIN(BUILT_IN_EXPL,
589 "__builtin_expl",
590 BT_FN_LONG_DOUBLE_LONG_DOUBLE,
591 flag_errno_math ? ATTR_NOTHROW_LIST
592 : (flag_unsafe_math_optimizations
593 ? ATTR_CONST_NOTHROW_LIST
594 : ATTR_PURE_NOTHROW_LIST))
595 DEF_C99_C90RES_BUILTIN(BUILT_IN_LOGL,
596 "__builtin_logl",
597 BT_FN_LONG_DOUBLE_LONG_DOUBLE,
598 flag_errno_math ? ATTR_NOTHROW_LIST
599 : (flag_unsafe_math_optimizations
600 ? ATTR_CONST_NOTHROW_LIST
601 : ATTR_PURE_NOTHROW_LIST))
602 DEF_C99_C90RES_BUILTIN(BUILT_IN_POWL,
603 "__builtin_powl",
604 BT_FN_LONG_DOUBLE_LONG_DOUBLE_LONG_DOUBLE,
605 flag_errno_math ? ATTR_NOTHROW_LIST
606 : (flag_unsafe_math_optimizations
607 ? ATTR_CONST_NOTHROW_LIST
608 : ATTR_PURE_NOTHROW_LIST))
609 DEF_C99_C90RES_BUILTIN(BUILT_IN_ATAN2L,
610 "__builtin_atan2l",
611 BT_FN_LONG_DOUBLE_LONG_DOUBLE_LONG_DOUBLE,
612 flag_errno_math ? ATTR_NOTHROW_LIST
613 : (flag_unsafe_math_optimizations
614 ? ATTR_CONST_NOTHROW_LIST
615 : ATTR_PURE_NOTHROW_LIST))
616 DEF_C99_C90RES_BUILTIN(BUILT_IN_FMODL,
617 "__builtin_fmodl",
618 BT_FN_LONG_DOUBLE_LONG_DOUBLE_LONG_DOUBLE,
619 flag_errno_math ? ATTR_NOTHROW_LIST
620 : (flag_unsafe_math_optimizations
621 ? ATTR_CONST_NOTHROW_LIST
622 : ATTR_PURE_NOTHROW_LIST))
624 DEF_GCC_BUILTIN(BUILT_IN_INF,
625 "__builtin_inf",
626 BT_FN_DOUBLE,
627 ATTR_CONST_NOTHROW_LIST)
628 DEF_GCC_BUILTIN(BUILT_IN_INFF,
629 "__builtin_inff",
630 BT_FN_FLOAT,
631 ATTR_CONST_NOTHROW_LIST)
632 DEF_GCC_BUILTIN(BUILT_IN_INFL,
633 "__builtin_infl",
634 BT_FN_LONG_DOUBLE,
635 ATTR_CONST_NOTHROW_LIST)
637 DEF_GCC_BUILTIN(BUILT_IN_HUGE_VAL,
638 "__builtin_huge_val",
639 BT_FN_DOUBLE,
640 ATTR_CONST_NOTHROW_LIST)
641 DEF_GCC_BUILTIN(BUILT_IN_HUGE_VALF,
642 "__builtin_huge_valf",
643 BT_FN_FLOAT,
644 ATTR_CONST_NOTHROW_LIST)
645 DEF_GCC_BUILTIN(BUILT_IN_HUGE_VALL,
646 "__builtin_huge_vall",
647 BT_FN_LONG_DOUBLE,
648 ATTR_CONST_NOTHROW_LIST)
650 DEF_LIB_BUILTIN(BUILT_IN_NAN,
651 "__builtin_nan",
652 BT_FN_DOUBLE_CONST_STRING,
653 ATTR_CONST_NOTHROW_NONNULL_1)
654 DEF_LIB_BUILTIN(BUILT_IN_NANF,
655 "__builtin_nanf",
656 BT_FN_FLOAT_CONST_STRING,
657 ATTR_CONST_NOTHROW_NONNULL_1)
658 DEF_LIB_BUILTIN(BUILT_IN_NANL,
659 "__builtin_nanl",
660 BT_FN_LONG_DOUBLE_CONST_STRING,
661 ATTR_CONST_NOTHROW_NONNULL_1)
663 DEF_LIB_BUILTIN(BUILT_IN_NANS,
664 "__builtin_nans",
665 BT_FN_DOUBLE_CONST_STRING,
666 ATTR_CONST_NOTHROW_NONNULL_1)
667 DEF_LIB_BUILTIN(BUILT_IN_NANSF,
668 "__builtin_nansf",
669 BT_FN_FLOAT_CONST_STRING,
670 ATTR_CONST_NOTHROW_NONNULL_1)
671 DEF_LIB_BUILTIN(BUILT_IN_NANSL,
672 "__builtin_nansl",
673 BT_FN_LONG_DOUBLE_CONST_STRING,
674 ATTR_CONST_NOTHROW_NONNULL_1)
676 DEF_GCC_BUILTIN(BUILT_IN_SAVEREGS,
677 "__builtin_saveregs",
678 BT_FN_PTR_VAR,
679 ATTR_NULL)
680 DEF_GCC_BUILTIN(BUILT_IN_CLASSIFY_TYPE,
681 "__builtin_classify_type",
682 BT_FN_INT_VAR,
683 ATTR_NULL)
684 DEF_GCC_BUILTIN(BUILT_IN_NEXT_ARG,
685 "__builtin_next_arg",
686 BT_FN_PTR_VAR,
687 ATTR_NULL)
688 DEF_GCC_BUILTIN(BUILT_IN_ARGS_INFO,
689 "__builtin_args_info",
690 BT_FN_INT_INT,
691 ATTR_NULL)
692 DEF_GCC_BUILTIN(BUILT_IN_CONSTANT_P,
693 "__builtin_constant_p",
694 BT_FN_INT_VAR,
695 ATTR_CONST_NOTHROW_LIST)
696 DEF_GCC_BUILTIN(BUILT_IN_FRAME_ADDRESS,
697 "__builtin_frame_address",
698 BT_FN_PTR_UNSIGNED,
699 ATTR_NULL)
700 DEF_GCC_BUILTIN(BUILT_IN_RETURN_ADDRESS,
701 "__builtin_return_address",
702 BT_FN_PTR_UNSIGNED,
703 ATTR_NULL)
704 DEF_GCC_BUILTIN(BUILT_IN_AGGREGATE_INCOMING_ADDRESS,
705 "__builtin_aggregate_incoming_address",
706 BT_FN_PTR_VAR,
707 ATTR_NULL)
708 DEF_GCC_BUILTIN(BUILT_IN_APPLY_ARGS,
709 "__builtin_apply_args",
710 BT_FN_PTR_VAR,
711 ATTR_NULL)
712 DEF_GCC_BUILTIN(BUILT_IN_APPLY,
713 "__builtin_apply",
714 BT_FN_PTR_PTR_FN_VOID_VAR_PTR_SIZE,
715 ATTR_NULL)
716 DEF_GCC_BUILTIN(BUILT_IN_RETURN,
717 "__builtin_return",
718 BT_FN_VOID_PTR,
719 ATTR_NORETURN_NOTHROW_LIST)
720 DEF_GCC_BUILTIN(BUILT_IN_SETJMP,
721 "__builtin_setjmp",
722 BT_FN_INT_PTR,
723 ATTR_NULL)
724 DEF_GCC_BUILTIN(BUILT_IN_LONGJMP,
725 "__builtin_longjmp",
726 BT_FN_VOID_PTR_INT,
727 ATTR_NORETURN_NOTHROW_LIST)
728 DEF_GCC_BUILTIN(BUILT_IN_TRAP,
729 "__builtin_trap",
730 BT_FN_VOID,
731 ATTR_NORETURN_NOTHROW_LIST)
732 DEF_GCC_BUILTIN(BUILT_IN_PREFETCH,
733 "__builtin_prefetch",
734 BT_FN_VOID_CONST_PTR_VAR,
735 ATTR_NULL)
737 /* stdio.h builtins (without FILE *). */
739 DEF_FRONT_END_LIB_BUILTIN(BUILT_IN_PRINTF,
740 "__builtin_printf",
741 BT_FN_INT_CONST_STRING_VAR,
742 ATTR_FORMAT_PRINTF_1_2)
743 DEF_LIB_BUILTIN(BUILT_IN_PUTCHAR,
744 "__builtin_putchar",
745 BT_FN_INT_INT,
746 ATTR_NOTHROW_LIST)
747 DEF_LIB_BUILTIN(BUILT_IN_PUTS,
748 "__builtin_puts",
749 BT_FN_INT_CONST_STRING,
750 ATTR_NOTHROW_NONNULL_1)
751 DEF_C99_BUILTIN(BUILT_IN_SNPRINTF,
752 "__builtin_snprintf",
753 BT_FN_INT_STRING_SIZE_CONST_STRING_VAR,
754 ATTR_FORMAT_PRINTF_3_4)
755 DEF_LIB_BUILTIN(BUILT_IN_SPRINTF,
756 "__builtin_sprintf",
757 BT_FN_INT_STRING_CONST_STRING_VAR,
758 ATTR_FORMAT_PRINTF_2_3)
759 DEF_LIB_BUILTIN(BUILT_IN_SCANF,
760 "__builtin_scanf",
761 BT_FN_INT_CONST_STRING_VAR,
762 ATTR_FORMAT_SCANF_1_2)
763 DEF_LIB_BUILTIN(BUILT_IN_SSCANF,
764 "__builtin_sscanf",
765 BT_FN_INT_CONST_STRING_CONST_STRING_VAR,
766 ATTR_FORMAT_SCANF_2_3)
767 DEF_LIB_BUILTIN(BUILT_IN_VPRINTF,
768 "__builtin_vprintf",
769 BT_FN_INT_CONST_STRING_VALIST_ARG,
770 ATTR_FORMAT_PRINTF_1_0)
771 DEF_C99_BUILTIN(BUILT_IN_VSCANF,
772 "__builtin_vscanf",
773 BT_FN_INT_CONST_STRING_VALIST_ARG,
774 ATTR_FORMAT_SCANF_1_0)
775 DEF_C99_BUILTIN(BUILT_IN_VSSCANF,
776 "__builtin_vsscanf",
777 BT_FN_INT_CONST_STRING_CONST_STRING_VALIST_ARG,
778 ATTR_FORMAT_SCANF_2_0)
779 DEF_C99_BUILTIN(BUILT_IN_VSNPRINTF,
780 "__builtin_vsnprintf",
781 BT_FN_INT_STRING_SIZE_CONST_STRING_VALIST_ARG,
782 ATTR_FORMAT_PRINTF_3_0)
783 DEF_LIB_BUILTIN(BUILT_IN_VSPRINTF,
784 "__builtin_vsprintf",
785 BT_FN_INT_STRING_CONST_STRING_VALIST_ARG,
786 ATTR_FORMAT_PRINTF_2_0)
789 /* stdio.h builtins (with FILE *). */
791 /* Declare the __builtin_ style with arguments and the regular style
792 without them. We rely on stdio.h to supply the arguments for the
793 regular style declaration since we had to use void* instead of
794 FILE* in the __builtin_ prototype supplied here. */
796 DEF_FALLBACK_BUILTIN(BUILT_IN_FPUTC,
797 "__builtin_fputc",
798 BT_FN_INT_INT_PTR,
799 ATTR_NOTHROW_NONNULL_2)
800 DEF_BUILTIN (BUILT_IN_FPUTS,
801 "__builtin_fputs",
802 BUILT_IN_NORMAL,
803 BT_FN_INT_CONST_STRING_PTR,
804 BT_FN_INT_VAR,
805 true, true, false, ATTR_NOTHROW_NONNULL_1_2, true)
806 DEF_FALLBACK_BUILTIN(BUILT_IN_FWRITE,
807 "__builtin_fwrite",
808 BT_FN_SIZE_CONST_PTR_SIZE_SIZE_PTR,
809 ATTR_NOTHROW_NONNULL_1_4)
810 DEF_FRONT_END_LIB_BUILTIN(BUILT_IN_FPRINTF,
811 "__builtin_fprintf",
812 BT_FN_INT_PTR_CONST_STRING_VAR,
813 ATTR_FORMAT_PRINTF_2_3)
815 /* stdio unlocked builtins (without FILE *). */
817 DEF_EXT_FALLBACK_BUILTIN(BUILT_IN_PUTCHAR_UNLOCKED,
818 "__builtin_putchar_unlocked",
819 BT_FN_INT_INT, ATTR_NOTHROW_LIST)
820 DEF_EXT_FALLBACK_BUILTIN(BUILT_IN_PUTS_UNLOCKED,
821 "__builtin_puts_unlocked",
822 BT_FN_INT_CONST_STRING, ATTR_NOTHROW_NONNULL_1)
823 DEF_EXT_FRONT_END_LIB_BUILTIN(BUILT_IN_PRINTF_UNLOCKED,
824 "__builtin_printf_unlocked",
825 BT_FN_INT_CONST_STRING_VAR,
826 ATTR_FORMAT_PRINTF_1_2)
828 /* stdio unlocked builtins (with FILE *). */
830 /* Declare the __builtin_ style with arguments and the regular style
831 without them. We rely on stdio.h to supply the arguments for the
832 regular style declaration since we had to use void* instead of
833 FILE* in the __builtin_ prototype supplied here. */
835 DEF_EXT_FALLBACK_BUILTIN(BUILT_IN_FPUTC_UNLOCKED,
836 "__builtin_fputc_unlocked",
837 BT_FN_INT_INT_PTR, ATTR_NOTHROW_NONNULL_2)
838 DEF_BUILTIN (BUILT_IN_FPUTS_UNLOCKED,
839 "__builtin_fputs_unlocked",
840 BUILT_IN_NORMAL,
841 BT_FN_INT_CONST_STRING_PTR,
842 BT_FN_INT_VAR,
843 true, true, true, ATTR_NOTHROW_NONNULL_1_2, true)
844 DEF_EXT_FALLBACK_BUILTIN(BUILT_IN_FWRITE_UNLOCKED,
845 "__builtin_fwrite_unlocked",
846 BT_FN_SIZE_CONST_PTR_SIZE_SIZE_PTR, ATTR_NOTHROW_NONNULL_1_4)
847 DEF_EXT_FRONT_END_LIB_BUILTIN(BUILT_IN_FPRINTF_UNLOCKED,
848 "__builtin_fprintf_unlocked",
849 BT_FN_INT_PTR_CONST_STRING_VAR,
850 ATTR_FORMAT_PRINTF_2_3)
852 /* ISO C99 floating point unordered comparisons. */
853 DEF_GCC_BUILTIN(BUILT_IN_ISGREATER,
854 "__builtin_isgreater",
855 BT_FN_INT_VAR,
856 ATTR_CONST_NOTHROW_LIST)
857 DEF_GCC_BUILTIN(BUILT_IN_ISGREATEREQUAL,
858 "__builtin_isgreaterequal",
859 BT_FN_INT_VAR,
860 ATTR_CONST_NOTHROW_LIST)
861 DEF_GCC_BUILTIN(BUILT_IN_ISLESS,
862 "__builtin_isless",
863 BT_FN_INT_VAR,
864 ATTR_CONST_NOTHROW_LIST)
865 DEF_GCC_BUILTIN(BUILT_IN_ISLESSEQUAL,
866 "__builtin_islessequal",
867 BT_FN_INT_VAR,
868 ATTR_CONST_NOTHROW_LIST)
869 DEF_GCC_BUILTIN(BUILT_IN_ISLESSGREATER,
870 "__builtin_islessgreater",
871 BT_FN_INT_VAR,
872 ATTR_CONST_NOTHROW_LIST)
873 DEF_GCC_BUILTIN(BUILT_IN_ISUNORDERED,
874 "__builtin_isunordered",
875 BT_FN_INT_VAR,
876 ATTR_CONST_NOTHROW_LIST)
878 /* Various hooks for the DWARF 2 __throw routine. */
879 DEF_GCC_BUILTIN(BUILT_IN_UNWIND_INIT,
880 "__builtin_unwind_init",
881 BT_FN_VOID,
882 ATTR_NULL)
883 DEF_GCC_BUILTIN(BUILT_IN_DWARF_CFA,
884 "__builtin_dwarf_cfa",
885 BT_FN_PTR,
886 ATTR_NULL)
887 DEF_GCC_BUILTIN(BUILT_IN_DWARF_SP_COLUMN,
888 "__builtin_dwarf_sp_column",
889 BT_FN_UNSIGNED,
890 ATTR_NULL)
891 DEF_GCC_BUILTIN(BUILT_IN_INIT_DWARF_REG_SIZES,
892 "__builtin_init_dwarf_reg_size_table",
893 BT_FN_VOID_PTR,
894 ATTR_NULL)
895 DEF_GCC_BUILTIN(BUILT_IN_FROB_RETURN_ADDR,
896 "__builtin_frob_return_addr",
897 BT_FN_PTR_PTR,
898 ATTR_NULL)
899 DEF_GCC_BUILTIN(BUILT_IN_EXTRACT_RETURN_ADDR,
900 "__builtin_extract_return_addr",
901 BT_FN_PTR_PTR,
902 ATTR_NULL)
903 DEF_GCC_BUILTIN(BUILT_IN_EH_RETURN,
904 "__builtin_eh_return",
905 BT_FN_VOID_PTRMODE_PTR,
906 ATTR_NORETURN_NOTHROW_LIST)
907 DEF_GCC_BUILTIN(BUILT_IN_EH_RETURN_DATA_REGNO,
908 "__builtin_eh_return_data_regno",
909 BT_FN_INT_INT,
910 ATTR_NULL)
912 /* Variable argument list (stdarg.h) support */
913 DEF_GCC_BUILTIN(BUILT_IN_VA_START,
914 "__builtin_va_start",
915 BT_FN_VOID_VALIST_REF_VAR,
916 ATTR_NULL)
917 DEF_GCC_BUILTIN(BUILT_IN_STDARG_START, /* backward compat */
918 "__builtin_stdarg_start",
919 BT_FN_VOID_VALIST_REF_VAR,
920 ATTR_NULL)
921 DEF_GCC_BUILTIN(BUILT_IN_VA_END,
922 "__builtin_va_end",
923 BT_FN_VOID_VALIST_REF,
924 ATTR_NULL)
925 DEF_GCC_BUILTIN(BUILT_IN_VA_COPY,
926 "__builtin_va_copy",
927 BT_FN_VOID_VALIST_REF_VALIST_ARG,
928 ATTR_NULL)
930 DEF_GCC_BUILTIN(BUILT_IN_EXPECT,
931 "__builtin_expect",
932 BT_FN_LONG_LONG_LONG,
933 ATTR_NULL)
935 /* Declare abort, exit, _exit and _Exit */
936 DEF_LIB_BUILTIN(BUILT_IN_ABORT,
937 "__builtin_abort",
938 BT_FN_VOID,
939 ATTR_NORETURN_NOTHROW_LIST)
940 DEF_LIB_BUILTIN(BUILT_IN_EXIT,
941 "__builtin_exit",
942 BT_FN_VOID_INT,
943 ATTR_NORETURN_NOTHROW_LIST)
944 DEF_EXT_LIB_BUILTIN(BUILT_IN__EXIT,
945 "__builtin__exit",
946 BT_FN_VOID_INT,
947 ATTR_NORETURN_NOTHROW_LIST)
948 DEF_C99_BUILTIN(BUILT_IN__EXIT2,
949 "__builtin__Exit",
950 BT_FN_VOID_INT,
951 ATTR_NORETURN_NOTHROW_LIST)
953 /* Declare malloc, calloc and strdup. */
954 DEF_LIB_BUILTIN(BUILT_IN_MALLOC,
955 "__builtin_malloc",
956 BT_FN_PTR_SIZE,
957 ATTR_MALLOC_NOTHROW_LIST)
959 DEF_LIB_BUILTIN(BUILT_IN_CALLOC,
960 "__builtin_calloc",
961 BT_FN_PTR_SIZE_SIZE,
962 ATTR_MALLOC_NOTHROW_LIST)
964 DEF_EXT_LIB_BUILTIN(BUILT_IN_STRDUP,
965 "__builtin_strdup",
966 BT_FN_STRING_CONST_STRING,
967 ATTR_MALLOC_NOTHROW_NONNULL_1)