aboutsummaryrefslogtreecommitdiff
path: root/gcc/builtins.def
blob: a45641cf0ae5f5f1467186fb1769321f504e627b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
/* This file contains the definitions and documentation for the
   builtins used in the GNU compiler.
   Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.

This file is part of GCC.

GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2, or (at your option) any later
version.

GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
for more details.

You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING.  If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.  */

/* Before including this file, you should define a macro:

     DEF_BUILTIN (ENUM, NAME, CLASS, TYPE, LIBTYPE, BOTH_P,
                  FALLBACK_P, NONANSI_P, ATTRS, IMPLICIT)

   This macro will be called once for each builtin function.  The
   ENUM will be of type `enum built_in_function', and will indicate
   which builtin function is being processed.  The NAME of the builtin
   function (which will always start with `__builtin_') is a string
   literal.  The CLASS is of type `enum built_in_class' and indicates
   what kind of builtin is being processed.

   Some builtins are actually two separate functions.  For example,
   for `strcmp' there are two builtin functions; `__builtin_strcmp'
   and `strcmp' itself.  Both behave identically.  Other builtins
   define only the `__builtin' variant.  If BOTH_P is TRUE, then this
   builtin has both variants; otherwise, it is has only the first
   variant.

   TYPE indicates the type of the function.  The symbols correspond to
   enumerals from builtin-types.def.  If BOTH_P is true, then LIBTYPE
   is the type of the non-`__builtin_' variant.  Otherwise, LIBTYPE
   should be ignored.

   If FALLBACK_P is true then, if for some reason, the compiler cannot
   expand the builtin function directly, it will call the
   corresponding library function (which does not have the
   `__builtin_' prefix.

   If NONANSI_P is true, then the non-`__builtin_' variant is not an
   ANSI/ISO library function, and so we should pretend it does not
   exist when compiling in ANSI conformant mode.

   ATTRs is an attribute list as defined in builtin-attrs.def that
   describes the attributes of this builtin function.  

   IMPLICIT specifies condition when the builtin can be produced by
   compiler.  For instance C90 reserves floorf function, but does not
   define it's meaning.  When user uses floorf we may assume that the
   floorf has the meaning we expect, but we can't produce floorf by
   simplifying floor((double)float) since the runtime need not implement
   it.  */
   
/* A GCC builtin (like __builtin_saveregs) is provided by the
   compiler, but does not correspond to a function in the standard
   library.  */
#undef DEF_GCC_BUILTIN
#define DEF_GCC_BUILTIN(ENUM, NAME, TYPE, ATTRS)		\
  DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, TYPE, BT_LAST,	\
               false, false, false, ATTRS, true)


/* A fallback builtin is a builtin (like __builtin_puts) that falls
   back to the corresopnding library function if necessary -- but
   for which we should not introduce the non-`__builtin' variant of
   the name.  */
#undef DEF_FALLBACK_BUILTIN				
#define DEF_FALLBACK_BUILTIN(ENUM, NAME, TYPE, ATTRS)	\
  DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, TYPE, TYPE,	\
	       false, true, false, ATTRS, true)

/* Like DEF_FALLBACK_BUILTIN, except that the function is not one that
   is specified by ANSI/ISO C.  So, when we're being fully conformant
   we ignore the version of these builtins that does not begin with
   __builtin.  */
#undef DEF_EXT_FALLBACK_BUILTIN
#define DEF_EXT_FALLBACK_BUILTIN(ENUM, NAME, TYPE, ATTRS)	\
  DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, TYPE, TYPE,	\
	       false, true, true, ATTRS, true)

/* A library builtin (like __builtin_strchr) is a builtin equivalent
   of an ANSI/ISO standard library function.  In addition to the
   `__builtin' version, we will create an ordinary version (e.g,
   `strchr') as well.  If we cannot compute the answer using the
   builtin function, we will fall back to the standard library
   version.  */
#undef DEF_LIB_BUILTIN					
#define DEF_LIB_BUILTIN(ENUM, NAME, TYPE, ATTRS)	\
  DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, TYPE, TYPE,	\
	       true, true, false, ATTRS, true)

/* Like DEF_LIB_BUILTIN, except that the function is not one that is
   specified by ANSI/ISO C.  So, when we're being fully conformant we
   ignore the version of these builtins that does not begin with
   __builtin.  */
#undef DEF_EXT_LIB_BUILTIN				
#define DEF_EXT_LIB_BUILTIN(ENUM, NAME, TYPE, ATTRS)	\
  DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, TYPE, TYPE,	\
   	       true, true, true, ATTRS, false)

/* Like DEF_LIB_BUILTIN, except that the function is only a part of
   the standard in C99 or above.  */
#undef DEF_C99_BUILTIN					
#define DEF_C99_BUILTIN(ENUM, NAME, TYPE, ATTRS)	\
  DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, TYPE, TYPE,	\
   	       true, true, !flag_isoc99, ATTRS, TARGET_C99_FUNCTIONS)

/* Builtin that is specified by C99 and C90 reserve the name for future use.
   We can still recognize the builtin in C90 mode but we can't produce it
   implicitly.  */
#undef DEF_C99_C90RES_BUILTIN					
#define DEF_C99_C90RES_BUILTIN(ENUM, NAME, TYPE, ATTRS)	\
  DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, TYPE, TYPE,	\
   	       true, true, !flag_isoc99, ATTRS, TARGET_C99_FUNCTIONS)

/* Like DEF_LIB_BUILTIN, except that the function is expanded in the
   front-end.  */
#undef DEF_FRONT_END_LIB_BUILTIN			
#define DEF_FRONT_END_LIB_BUILTIN(ENUM, NAME, TYPE, ATTRS)	\
  DEF_BUILTIN (ENUM, NAME, BUILT_IN_FRONTEND, TYPE, TYPE,	\
	       true, true, false, ATTRS, true)

/* Like DEF_FRONT_END_LIB_BUILTIN, except that the function is not one
   that is specified by ANSI/ISO C.  So, when we're being fully
   conformant we ignore the version of these builtins that does not
   begin with __builtin.  */
#undef DEF_EXT_FRONT_END_LIB_BUILTIN			
#define DEF_EXT_FRONT_END_LIB_BUILTIN(ENUM, NAME, TYPE, ATTRS)	\
  DEF_BUILTIN (ENUM, NAME, BUILT_IN_FRONTEND, TYPE, TYPE,	\
	       true, true, true, ATTRS, true)

/* If SMALL_STACK is defined, then `alloca' is only defined in its
   `__builtin' form.  */
#if SMALL_STACK  
DEF_FALLBACK_BUILTIN(BUILT_IN_ALLOCA,
		     "__builtin_alloca",
		     BT_FN_PTR_SIZE,
		     ATTR_MALLOC_NOTHROW_LIST)
#else
DEF_EXT_LIB_BUILTIN(BUILT_IN_ALLOCA,
		    "__builtin_alloca",
		    BT_FN_PTR_SIZE,
		    ATTR_MALLOC_NOTHROW_LIST)
#endif

DEF_LIB_BUILTIN(BUILT_IN_ABS,
		"__builtin_abs",
		BT_FN_INT_INT,
		ATTR_CONST_NOTHROW_LIST)
DEF_LIB_BUILTIN(BUILT_IN_LABS,
		"__builtin_labs",
		BT_FN_LONG_LONG,
		ATTR_CONST_NOTHROW_LIST)

DEF_LIB_BUILTIN(BUILT_IN_FABS,
		"__builtin_fabs",
		BT_FN_DOUBLE_DOUBLE,
		ATTR_CONST_NOTHROW_LIST)
DEF_C99_C90RES_BUILTIN(BUILT_IN_FABSF,
		       "__builtin_fabsf",
		       BT_FN_FLOAT_FLOAT,
		       ATTR_CONST_NOTHROW_LIST)
DEF_C99_C90RES_BUILTIN(BUILT_IN_FABSL,
		       "__builtin_fabsl",
		       BT_FN_LONG_DOUBLE_LONG_DOUBLE,
		       ATTR_CONST_NOTHROW_LIST)

DEF_LIB_BUILTIN(BUILT_IN_FLOOR,
                "__builtin_floor",
                BT_FN_DOUBLE_DOUBLE,
		ATTR_CONST_NOTHROW_LIST)
DEF_C99_C90RES_BUILTIN(BUILT_IN_FLOORF,
		       "__builtin_floorf",
		       BT_FN_FLOAT_FLOAT,
		       ATTR_CONST_NOTHROW_LIST)
DEF_C99_C90RES_BUILTIN(BUILT_IN_FLOORL,
		       "__builtin_floorl",
		       BT_FN_LONG_DOUBLE_LONG_DOUBLE,
		       ATTR_CONST_NOTHROW_LIST)

DEF_LIB_BUILTIN(BUILT_IN_CEIL,
                "__builtin_ceil",
                BT_FN_DOUBLE_DOUBLE,
		ATTR_CONST_NOTHROW_LIST)
DEF_C99_C90RES_BUILTIN(BUILT_IN_CEILF,
		       "__builtin_ceilf",
		       BT_FN_FLOAT_FLOAT,
		       ATTR_CONST_NOTHROW_LIST)
DEF_C99_C90RES_BUILTIN(BUILT_IN_CEILL,
		       "__builtin_ceill",
		       BT_FN_LONG_DOUBLE_LONG_DOUBLE,
		       ATTR_CONST_NOTHROW_LIST)

DEF_C99_BUILTIN(BUILT_IN_ROUND,
		"__builtin_round",
		BT_FN_DOUBLE_DOUBLE,
		ATTR_CONST_NOTHROW_LIST)
DEF_C99_BUILTIN(BUILT_IN_ROUNDF,
		"__builtin_roundf",
		BT_FN_FLOAT_FLOAT,
		ATTR_CONST_NOTHROW_LIST)
DEF_C99_BUILTIN(BUILT_IN_ROUNDL,
		"__builtin_roundl",
		BT_FN_LONG_DOUBLE_LONG_DOUBLE,
		ATTR_CONST_NOTHROW_LIST)

DEF_C99_BUILTIN(BUILT_IN_TRUNC,
		"__builtin_trunc",
		BT_FN_DOUBLE_DOUBLE,
		ATTR_CONST_NOTHROW_LIST)
DEF_C99_BUILTIN(BUILT_IN_TRUNCF,
		"__builtin_truncf",
		BT_FN_FLOAT_FLOAT,
		ATTR_CONST_NOTHROW_LIST)
DEF_C99_BUILTIN(BUILT_IN_TRUNCL,
		"__builtin_truncl",
		BT_FN_LONG_DOUBLE_LONG_DOUBLE,
		ATTR_CONST_NOTHROW_LIST)

DEF_C99_BUILTIN(BUILT_IN_NEARBYINT,
		"__builtin_nearbyint",
		BT_FN_DOUBLE_DOUBLE,
		ATTR_CONST_NOTHROW_LIST)
DEF_C99_BUILTIN(BUILT_IN_NEARBYINTF,
		"__builtin_nearbyintf",
		BT_FN_FLOAT_FLOAT,
		ATTR_CONST_NOTHROW_LIST)
DEF_C99_BUILTIN(BUILT_IN_NEARBYINTL,
		"__builtin_nearbyintl",
		BT_FN_LONG_DOUBLE_LONG_DOUBLE,
		ATTR_CONST_NOTHROW_LIST)

DEF_C99_BUILTIN(BUILT_IN_LLABS,
		"__builtin_llabs",
		BT_FN_LONGLONG_LONGLONG,
		ATTR_CONST_NOTHROW_LIST)
DEF_C99_BUILTIN(BUILT_IN_IMAXABS,
		"__builtin_imaxabs",
		BT_FN_INTMAX_INTMAX,
		ATTR_CONST_NOTHROW_LIST)
DEF_C99_BUILTIN(BUILT_IN_CONJ,
		"__builtin_conj",
		BT_FN_COMPLEX_DOUBLE_COMPLEX_DOUBLE,
		ATTR_CONST_NOTHROW_LIST)
DEF_C99_BUILTIN(BUILT_IN_CONJF,
		"__builtin_conjf",
		BT_FN_COMPLEX_FLOAT_COMPLEX_FLOAT,
		ATTR_CONST_NOTHROW_LIST)
DEF_C99_BUILTIN(BUILT_IN_CONJL,
		"__builtin_conjl",
		BT_FN_COMPLEX_LONG_DOUBLE_COMPLEX_LONG_DOUBLE,
		ATTR_CONST_NOTHROW_LIST)
DEF_C99_BUILTIN(BUILT_IN_CREAL,
		"__builtin_creal",
		BT_FN_DOUBLE_COMPLEX_DOUBLE,
		ATTR_CONST_NOTHROW_LIST)
DEF_C99_BUILTIN(BUILT_IN_CREALF,
		"__builtin_crealf",
		BT_FN_FLOAT_COMPLEX_FLOAT,
		ATTR_CONST_NOTHROW_LIST)
DEF_C99_BUILTIN(BUILT_IN_CREALL,
		"__builtin_creall",
		BT_FN_LONG_DOUBLE_COMPLEX_LONG_DOUBLE,
		ATTR_CONST_NOTHROW_LIST)
DEF_C99_BUILTIN(BUILT_IN_CIMAG,
		"__builtin_cimag",
		BT_FN_DOUBLE_COMPLEX_DOUBLE,
		ATTR_CONST_NOTHROW_LIST)
DEF_C99_BUILTIN(BUILT_IN_CIMAGF,
		"__builtin_cimagf",
		BT_FN_FLOAT_COMPLEX_FLOAT,
		ATTR_CONST_NOTHROW_LIST)
DEF_C99_BUILTIN(BUILT_IN_CIMAGL,
		"__builtin_cimagl",
		BT_FN_LONG_DOUBLE_COMPLEX_LONG_DOUBLE,
		ATTR_CONST_NOTHROW_LIST)

/* The system prototypes for `bzero', 'bcopy' and `bcmp' functions
   have many variations, so don't specify parameters to avoid
   conflicts.  The expand_* functions check the argument types anyway.
   In addition, these functions have traditionally accepted NULL
   pointers when the length parameter is zero, so don't apply
   attribute "nonnull".  */
DEF_BUILTIN (BUILT_IN_BZERO,
	     "__builtin_bzero",
	     BUILT_IN_NORMAL,
	     BT_FN_VOID_PTR_SIZE, 
	     BT_FN_VOID_VAR,
	     true, true, true,
	     ATTR_NOTHROW_LIST, false)
DEF_BUILTIN (BUILT_IN_BCOPY,
	     "__builtin_bcopy",
	     BUILT_IN_NORMAL,
	     BT_FN_VOID_CONST_PTR_PTR_SIZE, 
	     BT_FN_VOID_VAR,
	     true, true, true,
	     ATTR_NOTHROW_LIST, false)
DEF_BUILTIN (BUILT_IN_BCMP,
	     "__builtin_bcmp",
	     BUILT_IN_NORMAL,
	     BT_FN_INT_CONST_PTR_CONST_PTR_SIZE,
	     BT_FN_INT_VAR,
	     true, true, true,
	     ATTR_PURE_NOTHROW_LIST, false)

DEF_EXT_LIB_BUILTIN(BUILT_IN_FFS,
		    "__builtin_ffs",
		    BT_FN_INT_INT,
		    ATTR_CONST_NOTHROW_LIST)
DEF_GCC_BUILTIN(BUILT_IN_CLZ,
		    "__builtin_clz",
		    BT_FN_INT_INT,
		    ATTR_CONST_NOTHROW_LIST)
DEF_GCC_BUILTIN(BUILT_IN_CTZ,
		    "__builtin_ctz",
		    BT_FN_INT_INT,
		    ATTR_CONST_NOTHROW_LIST)
DEF_GCC_BUILTIN(BUILT_IN_POPCOUNT,
		    "__builtin_popcount",
		    BT_FN_INT_INT,
		    ATTR_CONST_NOTHROW_LIST)
DEF_GCC_BUILTIN(BUILT_IN_PARITY,
		    "__builtin_parity",
		    BT_FN_INT_INT,
		    ATTR_CONST_NOTHROW_LIST)

DEF_GCC_BUILTIN(BUILT_IN_FFSL,
		    "__builtin_ffsl",
		    BT_FN_INT_LONG,
		    ATTR_CONST_NOTHROW_LIST)
DEF_GCC_BUILTIN(BUILT_IN_CLZL,
		    "__builtin_clzl",
		    BT_FN_INT_LONG,
		    ATTR_CONST_NOTHROW_LIST)
DEF_GCC_BUILTIN(BUILT_IN_CTZL,
		    "__builtin_ctzl",
		    BT_FN_INT_LONG,
		    ATTR_CONST_NOTHROW_LIST)
DEF_GCC_BUILTIN(BUILT_IN_POPCOUNTL,
		    "__builtin_popcountl",
		    BT_FN_INT_LONG,
		    ATTR_CONST_NOTHROW_LIST)
DEF_GCC_BUILTIN(BUILT_IN_PARITYL,
		    "__builtin_parityl",
		    BT_FN_INT_LONG,
		    ATTR_CONST_NOTHROW_LIST)

DEF_EXT_LIB_BUILTIN(BUILT_IN_FFSLL,
		    "__builtin_ffsll",
		    BT_FN_INT_LONGLONG,
		    ATTR_CONST_NOTHROW_LIST)
DEF_GCC_BUILTIN(BUILT_IN_CLZLL,
		    "__builtin_clzll",
		    BT_FN_INT_LONGLONG,
		    ATTR_CONST_NOTHROW_LIST)
DEF_GCC_BUILTIN(BUILT_IN_CTZLL,
		    "__builtin_ctzll",
		    BT_FN_INT_LONGLONG,
		    ATTR_CONST_NOTHROW_LIST)
DEF_GCC_BUILTIN(BUILT_IN_POPCOUNTLL,
		    "__builtin_popcountll",
		    BT_FN_INT_LONGLONG,
		    ATTR_CONST_NOTHROW_LIST)
DEF_GCC_BUILTIN(BUILT_IN_PARITYLL,
		    "__builtin_parityll",
		    BT_FN_INT_LONGLONG,
		    ATTR_CONST_NOTHROW_LIST)

DEF_EXT_LIB_BUILTIN(BUILT_IN_INDEX,
		    "__builtin_index",
		    BT_FN_STRING_CONST_STRING_INT,
		    ATTR_PURE_NOTHROW_NONNULL_1)
DEF_EXT_LIB_BUILTIN(BUILT_IN_RINDEX,
		    "__builtin_rindex",
		    BT_FN_STRING_CONST_STRING_INT,
		    ATTR_PURE_NOTHROW_NONNULL_1)

DEF_LIB_BUILTIN(BUILT_IN_MEMCPY,
		"__builtin_memcpy",
		BT_FN_PTR_PTR_CONST_PTR_SIZE,
		ATTR_NOTHROW_NONNULL_1_2)
DEF_LIB_BUILTIN(BUILT_IN_MEMMOVE,
		"__builtin_memmove",
		BT_FN_PTR_PTR_CONST_PTR_SIZE,
		ATTR_NOTHROW_NONNULL_1_2)
DEF_LIB_BUILTIN(BUILT_IN_MEMCMP,
		"__builtin_memcmp",
		BT_FN_INT_CONST_PTR_CONST_PTR_SIZE,
		ATTR_PURE_NOTHROW_NONNULL_1_2)
DEF_LIB_BUILTIN(BUILT_IN_MEMSET,
		"__builtin_memset",
		BT_FN_PTR_PTR_INT_SIZE,
		ATTR_NOTHROW_NONNULL_1)
DEF_EXT_LIB_BUILTIN(BUILT_IN_MEMPCPY,
		"__builtin_mempcpy",
		BT_FN_PTR_PTR_CONST_PTR_SIZE,
		ATTR_NOTHROW_NONNULL_1_2)

DEF_LIB_BUILTIN(BUILT_IN_STRCAT,
		"__builtin_strcat",
		BT_FN_STRING_STRING_CONST_STRING,
		ATTR_NOTHROW_NONNULL_1_2)
DEF_LIB_BUILTIN(BUILT_IN_STRNCAT,
		"__builtin_strncat",
		BT_FN_STRING_STRING_CONST_STRING_SIZE,
		ATTR_NOTHROW_NONNULL_1_2)
DEF_EXT_LIB_BUILTIN(BUILT_IN_STPCPY,
		"__builtin_stpcpy",
		BT_FN_STRING_STRING_CONST_STRING,
		ATTR_NOTHROW_NONNULL_1_2)
DEF_LIB_BUILTIN(BUILT_IN_STRCPY,
		"__builtin_strcpy",
		BT_FN_STRING_STRING_CONST_STRING,
		ATTR_NOTHROW_NONNULL_1_2)
DEF_LIB_BUILTIN(BUILT_IN_STRNCPY,
		"__builtin_strncpy",
		BT_FN_STRING_STRING_CONST_STRING_SIZE,
		ATTR_NOTHROW_NONNULL_1_2)
DEF_LIB_BUILTIN(BUILT_IN_STRCMP,
		"__builtin_strcmp",
		BT_FN_INT_CONST_STRING_CONST_STRING,
		ATTR_PURE_NOTHROW_NONNULL_1_2)
DEF_LIB_BUILTIN(BUILT_IN_STRNCMP,
		"__builtin_strncmp",
		BT_FN_INT_CONST_STRING_CONST_STRING_SIZE,
		ATTR_PURE_NOTHROW_NONNULL_1_2)
DEF_LIB_BUILTIN(BUILT_IN_STRLEN,
		"__builtin_strlen",
		BT_FN_SIZE_CONST_STRING,
		ATTR_PURE_NOTHROW_NONNULL_1)
DEF_LIB_BUILTIN(BUILT_IN_STRSTR,
		"__builtin_strstr",
		BT_FN_STRING_CONST_STRING_CONST_STRING,
		ATTR_PURE_NOTHROW_NONNULL_1_2)
DEF_LIB_BUILTIN(BUILT_IN_STRPBRK,
		"__builtin_strpbrk",
		BT_FN_STRING_CONST_STRING_CONST_STRING,
		ATTR_PURE_NOTHROW_NONNULL_1_2)
DEF_LIB_BUILTIN(BUILT_IN_STRSPN,
		"__builtin_strspn",
		BT_FN_SIZE_CONST_STRING_CONST_STRING,
		ATTR_PURE_NOTHROW_NONNULL_1_2)
DEF_LIB_BUILTIN(BUILT_IN_STRCSPN,
		"__builtin_strcspn",
		BT_FN_SIZE_CONST_STRING_CONST_STRING,
		ATTR_PURE_NOTHROW_NONNULL_1_2)
DEF_LIB_BUILTIN(BUILT_IN_STRCHR,
		"__builtin_strchr",
		BT_FN_STRING_CONST_STRING_INT,
		ATTR_PURE_NOTHROW_NONNULL_1)
DEF_LIB_BUILTIN(BUILT_IN_STRRCHR,
		"__builtin_strrchr",
		BT_FN_STRING_CONST_STRING_INT,
		ATTR_PURE_NOTHROW_NONNULL_1)

DEF_LIB_BUILTIN(BUILT_IN_SQRT,
		"__builtin_sqrt",
		BT_FN_DOUBLE_DOUBLE,
		flag_errno_math ? ATTR_NOTHROW_LIST
				: (flag_unsafe_math_optimizations
				   ? ATTR_CONST_NOTHROW_LIST
				   : ATTR_PURE_NOTHROW_LIST))
DEF_LIB_BUILTIN(BUILT_IN_SIN,
		"__builtin_sin",
		BT_FN_DOUBLE_DOUBLE,
		flag_unsafe_math_optimizations ? ATTR_CONST_NOTHROW_LIST
					       : ATTR_PURE_NOTHROW_LIST)
DEF_LIB_BUILTIN(BUILT_IN_COS,
		"__builtin_cos",
		BT_FN_DOUBLE_DOUBLE,
		flag_unsafe_math_optimizations ? ATTR_CONST_NOTHROW_LIST
					       : ATTR_PURE_NOTHROW_LIST)
DEF_LIB_BUILTIN(BUILT_IN_EXP,
		"__builtin_exp",
		BT_FN_DOUBLE_DOUBLE,
		flag_errno_math ? ATTR_NOTHROW_LIST
				: (flag_unsafe_math_optimizations
				   ? ATTR_CONST_NOTHROW_LIST
				   : ATTR_PURE_NOTHROW_LIST))
DEF_LIB_BUILTIN(BUILT_IN_LOG,
		"__builtin_log",
		BT_FN_DOUBLE_DOUBLE,
		flag_errno_math ? ATTR_NOTHROW_LIST
				: (flag_unsafe_math_optimizations
				   ? ATTR_CONST_NOTHROW_LIST
				   : ATTR_PURE_NOTHROW_LIST))
DEF_LIB_BUILTIN(BUILT_IN_POW,
		"__builtin_pow",
		BT_FN_DOUBLE_DOUBLE_DOUBLE,
		flag_errno_math ? ATTR_NOTHROW_LIST
				: (flag_unsafe_math_optimizations
				   ? ATTR_CONST_NOTHROW_LIST
				   : ATTR_PURE_NOTHROW_LIST))
DEF_LIB_BUILTIN(BUILT_IN_ATAN2,
		"__builtin_atan2",
		BT_FN_DOUBLE_DOUBLE_DOUBLE,
		flag_errno_math ? ATTR_NOTHROW_LIST
				: (flag_unsafe_math_optimizations
				   ? ATTR_CONST_NOTHROW_LIST
				   : ATTR_PURE_NOTHROW_LIST))
DEF_LIB_BUILTIN(BUILT_IN_FMOD,
		"__builtin_fmod",
		BT_FN_DOUBLE_DOUBLE_DOUBLE,
		flag_errno_math ? ATTR_NOTHROW_LIST
				: (flag_unsafe_math_optimizations
				   ? ATTR_CONST_NOTHROW_LIST
				   : ATTR_PURE_NOTHROW_LIST))
DEF_C99_C90RES_BUILTIN(BUILT_IN_SQRTF,
		       "__builtin_sqrtf",
		       BT_FN_FLOAT_FLOAT,
		       flag_errno_math ? ATTR_NOTHROW_LIST
				       : (flag_unsafe_math_optimizations
					  ? ATTR_CONST_NOTHROW_LIST
					  : ATTR_PURE_NOTHROW_LIST))
DEF_C99_C90RES_BUILTIN(BUILT_IN_SINF,
		       "__builtin_sinf",
		       BT_FN_FLOAT_FLOAT,
		       flag_unsafe_math_optimizations ? ATTR_CONST_NOTHROW_LIST
						      : ATTR_PURE_NOTHROW_LIST)
DEF_C99_C90RES_BUILTIN(BUILT_IN_COSF,
		       "__builtin_cosf",
		       BT_FN_FLOAT_FLOAT,
		       flag_unsafe_math_optimizations ? ATTR_CONST_NOTHROW_LIST
						      : ATTR_PURE_NOTHROW_LIST)
DEF_C99_C90RES_BUILTIN(BUILT_IN_EXPF,
		       "__builtin_expf",
		       BT_FN_FLOAT_FLOAT,
		       flag_errno_math ? ATTR_NOTHROW_LIST
				       : (flag_unsafe_math_optimizations
					  ? ATTR_CONST_NOTHROW_LIST
					  : ATTR_PURE_NOTHROW_LIST))
DEF_C99_C90RES_BUILTIN(BUILT_IN_LOGF,
		       "__builtin_logf",
		       BT_FN_FLOAT_FLOAT,
		       flag_errno_math ? ATTR_NOTHROW_LIST
				       : (flag_unsafe_math_optimizations
					  ? ATTR_CONST_NOTHROW_LIST
					  : ATTR_PURE_NOTHROW_LIST))
DEF_C99_C90RES_BUILTIN(BUILT_IN_POWF,
		       "__builtin_powf",
		       BT_FN_FLOAT_FLOAT_FLOAT,
		       flag_errno_math ? ATTR_NOTHROW_LIST
				       : (flag_unsafe_math_optimizations
					  ? ATTR_CONST_NOTHROW_LIST
					  : ATTR_PURE_NOTHROW_LIST))
DEF_C99_C90RES_BUILTIN(BUILT_IN_ATAN2F,
		       "__builtin_atan2f",
		       BT_FN_FLOAT_FLOAT_FLOAT,
		       flag_errno_math ? ATTR_NOTHROW_LIST
				       : (flag_unsafe_math_optimizations
					  ? ATTR_CONST_NOTHROW_LIST
					  : ATTR_PURE_NOTHROW_LIST))
DEF_C99_C90RES_BUILTIN(BUILT_IN_FMODF,
		       "__builtin_fmodf",
		       BT_FN_FLOAT_FLOAT_FLOAT,
		       flag_errno_math ? ATTR_NOTHROW_LIST
				       : (flag_unsafe_math_optimizations
					  ? ATTR_CONST_NOTHROW_LIST
					  : ATTR_PURE_NOTHROW_LIST))
DEF_C99_C90RES_BUILTIN(BUILT_IN_SQRTL,
		       "__builtin_sqrtl",
		       BT_FN_LONG_DOUBLE_LONG_DOUBLE,
		       flag_errno_math ? ATTR_NOTHROW_LIST
				       : (flag_unsafe_math_optimizations
					  ? ATTR_CONST_NOTHROW_LIST
					  : ATTR_PURE_NOTHROW_LIST))
DEF_C99_C90RES_BUILTIN(BUILT_IN_SINL,
		       "__builtin_sinl",
		       BT_FN_LONG_DOUBLE_LONG_DOUBLE,
		       flag_unsafe_math_optimizations ? ATTR_CONST_NOTHROW_LIST
						      : ATTR_PURE_NOTHROW_LIST)
DEF_C99_C90RES_BUILTIN(BUILT_IN_COSL,
		       "__builtin_cosl",
		       BT_FN_LONG_DOUBLE_LONG_DOUBLE,
		       flag_unsafe_math_optimizations ? ATTR_CONST_NOTHROW_LIST
						      : ATTR_PURE_NOTHROW_LIST)
DEF_C99_C90RES_BUILTIN(BUILT_IN_EXPL,
		       "__builtin_expl",
		       BT_FN_LONG_DOUBLE_LONG_DOUBLE,
		       flag_errno_math ? ATTR_NOTHROW_LIST
				       : (flag_unsafe_math_optimizations
					  ? ATTR_CONST_NOTHROW_LIST
					  : ATTR_PURE_NOTHROW_LIST))
DEF_C99_C90RES_BUILTIN(BUILT_IN_LOGL,
		       "__builtin_logl",
		       BT_FN_LONG_DOUBLE_LONG_DOUBLE,
		       flag_errno_math ? ATTR_NOTHROW_LIST
				       : (flag_unsafe_math_optimizations
					  ? ATTR_CONST_NOTHROW_LIST
					  : ATTR_PURE_NOTHROW_LIST))
DEF_C99_C90RES_BUILTIN(BUILT_IN_POWL,
		       "__builtin_powl",
		       BT_FN_LONG_DOUBLE_LONG_DOUBLE_LONG_DOUBLE,
		       flag_errno_math ? ATTR_NOTHROW_LIST
				       : (flag_unsafe_math_optimizations
					  ? ATTR_CONST_NOTHROW_LIST
					  : ATTR_PURE_NOTHROW_LIST))
DEF_C99_C90RES_BUILTIN(BUILT_IN_ATAN2L,
		       "__builtin_atan2l",
		       BT_FN_LONG_DOUBLE_LONG_DOUBLE_LONG_DOUBLE,
		       flag_errno_math ? ATTR_NOTHROW_LIST
				       : (flag_unsafe_math_optimizations
					  ? ATTR_CONST_NOTHROW_LIST
					  : ATTR_PURE_NOTHROW_LIST))
DEF_C99_C90RES_BUILTIN(BUILT_IN_FMODL,
		       "__builtin_fmodl",
		       BT_FN_LONG_DOUBLE_LONG_DOUBLE_LONG_DOUBLE,
		       flag_errno_math ? ATTR_NOTHROW_LIST
				       : (flag_unsafe_math_optimizations
					  ? ATTR_CONST_NOTHROW_LIST
					  : ATTR_PURE_NOTHROW_LIST))

DEF_GCC_BUILTIN(BUILT_IN_INF,
		"__builtin_inf",
		BT_FN_DOUBLE,
		ATTR_CONST_NOTHROW_LIST)
DEF_GCC_BUILTIN(BUILT_IN_INFF,
		"__builtin_inff",
		BT_FN_FLOAT,
		ATTR_CONST_NOTHROW_LIST)
DEF_GCC_BUILTIN(BUILT_IN_INFL,
		"__builtin_infl",
		BT_FN_LONG_DOUBLE,
		ATTR_CONST_NOTHROW_LIST)

DEF_GCC_BUILTIN(BUILT_IN_HUGE_VAL,
		"__builtin_huge_val",
		BT_FN_DOUBLE,
		ATTR_CONST_NOTHROW_LIST)
DEF_GCC_BUILTIN(BUILT_IN_HUGE_VALF,
		"__builtin_huge_valf",
		BT_FN_FLOAT,
		ATTR_CONST_NOTHROW_LIST)
DEF_GCC_BUILTIN(BUILT_IN_HUGE_VALL,
		"__builtin_huge_vall",
		BT_FN_LONG_DOUBLE,
		ATTR_CONST_NOTHROW_LIST)

DEF_LIB_BUILTIN(BUILT_IN_NAN,
		"__builtin_nan",
		BT_FN_DOUBLE_CONST_STRING,
		ATTR_CONST_NOTHROW_NONNULL_1)
DEF_LIB_BUILTIN(BUILT_IN_NANF,
		"__builtin_nanf",
		BT_FN_FLOAT_CONST_STRING,
		ATTR_CONST_NOTHROW_NONNULL_1)
DEF_LIB_BUILTIN(BUILT_IN_NANL,
		"__builtin_nanl",
		BT_FN_LONG_DOUBLE_CONST_STRING,
		ATTR_CONST_NOTHROW_NONNULL_1)

DEF_LIB_BUILTIN(BUILT_IN_NANS,
		"__builtin_nans",
		BT_FN_DOUBLE_CONST_STRING,
		ATTR_CONST_NOTHROW_NONNULL_1)
DEF_LIB_BUILTIN(BUILT_IN_NANSF,
		"__builtin_nansf",
		BT_FN_FLOAT_CONST_STRING,
		ATTR_CONST_NOTHROW_NONNULL_1)
DEF_LIB_BUILTIN(BUILT_IN_NANSL,
		"__builtin_nansl",
		BT_FN_LONG_DOUBLE_CONST_STRING,
		ATTR_CONST_NOTHROW_NONNULL_1)

DEF_GCC_BUILTIN(BUILT_IN_SAVEREGS,
		"__builtin_saveregs",
		BT_FN_PTR_VAR,
		ATTR_NULL)
DEF_GCC_BUILTIN(BUILT_IN_CLASSIFY_TYPE,
		"__builtin_classify_type",
		BT_FN_INT_VAR,
		ATTR_NULL)
DEF_GCC_BUILTIN(BUILT_IN_NEXT_ARG,
		"__builtin_next_arg",
		BT_FN_PTR_VAR,
		ATTR_NULL)
DEF_GCC_BUILTIN(BUILT_IN_ARGS_INFO,
		"__builtin_args_info",
		BT_FN_INT_INT,
		ATTR_NULL)
DEF_GCC_BUILTIN(BUILT_IN_CONSTANT_P, 
		"__builtin_constant_p", 
		BT_FN_INT_VAR,
		ATTR_CONST_NOTHROW_LIST)
DEF_GCC_BUILTIN(BUILT_IN_FRAME_ADDRESS,
		"__builtin_frame_address",
		BT_FN_PTR_UNSIGNED,
		ATTR_NULL)
DEF_GCC_BUILTIN(BUILT_IN_RETURN_ADDRESS, 
		"__builtin_return_address",
		BT_FN_PTR_UNSIGNED,
		ATTR_NULL)
DEF_GCC_BUILTIN(BUILT_IN_AGGREGATE_INCOMING_ADDRESS,
		"__builtin_aggregate_incoming_address",
		BT_FN_PTR_VAR,
		ATTR_NULL)
DEF_GCC_BUILTIN(BUILT_IN_APPLY_ARGS,
		"__builtin_apply_args",
		BT_FN_PTR_VAR,
		ATTR_NULL)
DEF_GCC_BUILTIN(BUILT_IN_APPLY,
		"__builtin_apply",
		BT_FN_PTR_PTR_FN_VOID_VAR_PTR_SIZE,
		ATTR_NULL)
DEF_GCC_BUILTIN(BUILT_IN_RETURN,
		"__builtin_return",
		BT_FN_VOID_PTR,
		ATTR_NORETURN_NOTHROW_LIST)
DEF_GCC_BUILTIN(BUILT_IN_SETJMP,
		"__builtin_setjmp",
		BT_FN_INT_PTR,
		ATTR_NULL)
DEF_GCC_BUILTIN(BUILT_IN_LONGJMP,
		"__builtin_longjmp",
		BT_FN_VOID_PTR_INT,
		ATTR_NORETURN_NOTHROW_LIST)
DEF_GCC_BUILTIN(BUILT_IN_TRAP,
		"__builtin_trap",
		BT_FN_VOID,
		ATTR_NORETURN_NOTHROW_LIST)
DEF_GCC_BUILTIN(BUILT_IN_PREFETCH,
		"__builtin_prefetch",
		BT_FN_VOID_CONST_PTR_VAR,
		ATTR_NULL)

/* stdio.h builtins (without FILE *).  */

DEF_FRONT_END_LIB_BUILTIN(BUILT_IN_PRINTF,
			  "__builtin_printf",
			  BT_FN_INT_CONST_STRING_VAR,
			  ATTR_FORMAT_PRINTF_1_2)
DEF_LIB_BUILTIN(BUILT_IN_PUTCHAR,
		"__builtin_putchar",
		BT_FN_INT_INT,
		ATTR_NOTHROW_LIST)
DEF_LIB_BUILTIN(BUILT_IN_PUTS,
		"__builtin_puts",
		BT_FN_INT_CONST_STRING,
		ATTR_NOTHROW_NONNULL_1)
DEF_C99_BUILTIN(BUILT_IN_SNPRINTF,
		"__builtin_snprintf",
		BT_FN_INT_STRING_SIZE_CONST_STRING_VAR,
		ATTR_FORMAT_PRINTF_3_4)
DEF_LIB_BUILTIN(BUILT_IN_SPRINTF,
		"__builtin_sprintf",
		BT_FN_INT_STRING_CONST_STRING_VAR,
		ATTR_FORMAT_PRINTF_2_3)
DEF_LIB_BUILTIN(BUILT_IN_SCANF,
		"__builtin_scanf",
		BT_FN_INT_CONST_STRING_VAR,
		ATTR_FORMAT_SCANF_1_2)
DEF_LIB_BUILTIN(BUILT_IN_SSCANF,
		"__builtin_sscanf",
		BT_FN_INT_CONST_STRING_CONST_STRING_VAR,
		ATTR_FORMAT_SCANF_2_3)
DEF_LIB_BUILTIN(BUILT_IN_VPRINTF,
		"__builtin_vprintf",
		BT_FN_INT_CONST_STRING_VALIST_ARG,
		ATTR_FORMAT_PRINTF_1_0)
DEF_C99_BUILTIN(BUILT_IN_VSCANF,
		"__builtin_vscanf",
		BT_FN_INT_CONST_STRING_VALIST_ARG,
		ATTR_FORMAT_SCANF_1_0)
DEF_C99_BUILTIN(BUILT_IN_VSSCANF,
		"__builtin_vsscanf",
		BT_FN_INT_CONST_STRING_CONST_STRING_VALIST_ARG,
		ATTR_FORMAT_SCANF_2_0)
DEF_C99_BUILTIN(BUILT_IN_VSNPRINTF,
		"__builtin_vsnprintf",
		BT_FN_INT_STRING_SIZE_CONST_STRING_VALIST_ARG,
		ATTR_FORMAT_PRINTF_3_0)
DEF_LIB_BUILTIN(BUILT_IN_VSPRINTF,
		"__builtin_vsprintf",
		BT_FN_INT_STRING_CONST_STRING_VALIST_ARG,
		ATTR_FORMAT_PRINTF_2_0)


/* stdio.h builtins (with FILE *).  */

/* Declare the __builtin_ style with arguments and the regular style
   without them.  We rely on stdio.h to supply the arguments for the
   regular style declaration since we had to use void* instead of
   FILE* in the __builtin_ prototype supplied here.  */

DEF_FALLBACK_BUILTIN(BUILT_IN_FPUTC,
		     "__builtin_fputc",
		     BT_FN_INT_INT_PTR,
		     ATTR_NOTHROW_NONNULL_2)
DEF_BUILTIN (BUILT_IN_FPUTS,
	     "__builtin_fputs",
	     BUILT_IN_NORMAL,
	     BT_FN_INT_CONST_STRING_PTR,
	     BT_FN_INT_VAR,
	     true, true, false, ATTR_NOTHROW_NONNULL_1_2, true)
DEF_FALLBACK_BUILTIN(BUILT_IN_FWRITE,
		     "__builtin_fwrite",
		     BT_FN_SIZE_CONST_PTR_SIZE_SIZE_PTR,
		      ATTR_NOTHROW_NONNULL_1_4)
DEF_FRONT_END_LIB_BUILTIN(BUILT_IN_FPRINTF,
			 "__builtin_fprintf",
			 BT_FN_INT_PTR_CONST_STRING_VAR,
			 ATTR_FORMAT_PRINTF_2_3)

/* stdio unlocked builtins (without FILE *).  */

DEF_EXT_FALLBACK_BUILTIN(BUILT_IN_PUTCHAR_UNLOCKED,
			 "__builtin_putchar_unlocked",
			 BT_FN_INT_INT, ATTR_NOTHROW_LIST)
DEF_EXT_FALLBACK_BUILTIN(BUILT_IN_PUTS_UNLOCKED,
			 "__builtin_puts_unlocked",
			 BT_FN_INT_CONST_STRING, ATTR_NOTHROW_NONNULL_1)
DEF_EXT_FRONT_END_LIB_BUILTIN(BUILT_IN_PRINTF_UNLOCKED,
			      "__builtin_printf_unlocked",
			      BT_FN_INT_CONST_STRING_VAR,
			      ATTR_FORMAT_PRINTF_1_2)

/* stdio unlocked builtins (with FILE *).  */

/* Declare the __builtin_ style with arguments and the regular style
   without them.  We rely on stdio.h to supply the arguments for the
   regular style declaration since we had to use void* instead of
   FILE* in the __builtin_ prototype supplied here.  */

DEF_EXT_FALLBACK_BUILTIN(BUILT_IN_FPUTC_UNLOCKED,
			 "__builtin_fputc_unlocked",
			 BT_FN_INT_INT_PTR, ATTR_NOTHROW_NONNULL_2)
DEF_BUILTIN (BUILT_IN_FPUTS_UNLOCKED,
	     "__builtin_fputs_unlocked",
	     BUILT_IN_NORMAL,
	     BT_FN_INT_CONST_STRING_PTR,
	     BT_FN_INT_VAR,
	     true, true, true, ATTR_NOTHROW_NONNULL_1_2, true)
DEF_EXT_FALLBACK_BUILTIN(BUILT_IN_FWRITE_UNLOCKED,
			 "__builtin_fwrite_unlocked",
			 BT_FN_SIZE_CONST_PTR_SIZE_SIZE_PTR, ATTR_NOTHROW_NONNULL_1_4)
DEF_EXT_FRONT_END_LIB_BUILTIN(BUILT_IN_FPRINTF_UNLOCKED,
			      "__builtin_fprintf_unlocked",
			      BT_FN_INT_PTR_CONST_STRING_VAR,
			      ATTR_FORMAT_PRINTF_2_3)

  /* ISO C99 floating point unordered comparisons.  */
DEF_GCC_BUILTIN(BUILT_IN_ISGREATER, 
		"__builtin_isgreater",
		BT_FN_INT_VAR,
		ATTR_CONST_NOTHROW_LIST)
DEF_GCC_BUILTIN(BUILT_IN_ISGREATEREQUAL,
		"__builtin_isgreaterequal",
		BT_FN_INT_VAR,
		ATTR_CONST_NOTHROW_LIST)
DEF_GCC_BUILTIN(BUILT_IN_ISLESS,
		"__builtin_isless",
		BT_FN_INT_VAR,
		ATTR_CONST_NOTHROW_LIST)
DEF_GCC_BUILTIN(BUILT_IN_ISLESSEQUAL,
		"__builtin_islessequal",
		BT_FN_INT_VAR,
		ATTR_CONST_NOTHROW_LIST)
DEF_GCC_BUILTIN(BUILT_IN_ISLESSGREATER,
		"__builtin_islessgreater",
		BT_FN_INT_VAR,
		ATTR_CONST_NOTHROW_LIST)
DEF_GCC_BUILTIN(BUILT_IN_ISUNORDERED,
		"__builtin_isunordered",
		BT_FN_INT_VAR,
		ATTR_CONST_NOTHROW_LIST)

/* Various hooks for the DWARF 2 __throw routine.  */
DEF_GCC_BUILTIN(BUILT_IN_UNWIND_INIT,
		"__builtin_unwind_init",
		BT_FN_VOID,
		ATTR_NULL)
DEF_GCC_BUILTIN(BUILT_IN_DWARF_CFA,
		"__builtin_dwarf_cfa",
		BT_FN_PTR,
		ATTR_NULL)
DEF_GCC_BUILTIN(BUILT_IN_DWARF_SP_COLUMN,
		"__builtin_dwarf_sp_column",
		BT_FN_UNSIGNED,
		ATTR_NULL)
DEF_GCC_BUILTIN(BUILT_IN_INIT_DWARF_REG_SIZES,
		"__builtin_init_dwarf_reg_size_table",
		BT_FN_VOID_PTR,
		ATTR_NULL)
DEF_GCC_BUILTIN(BUILT_IN_FROB_RETURN_ADDR,
		"__builtin_frob_return_addr",
		BT_FN_PTR_PTR,
		ATTR_NULL)
DEF_GCC_BUILTIN(BUILT_IN_EXTRACT_RETURN_ADDR,
		"__builtin_extract_return_addr",
		BT_FN_PTR_PTR,
		ATTR_NULL)
DEF_GCC_BUILTIN(BUILT_IN_EH_RETURN,
		"__builtin_eh_return",
		BT_FN_VOID_PTRMODE_PTR,
		ATTR_NORETURN_NOTHROW_LIST)
DEF_GCC_BUILTIN(BUILT_IN_EH_RETURN_DATA_REGNO,
		"__builtin_eh_return_data_regno",
		BT_FN_INT_INT,
		ATTR_NULL)

/* Variable argument list (stdarg.h) support */
DEF_GCC_BUILTIN(BUILT_IN_VA_START,
		"__builtin_va_start",
		BT_FN_VOID_VALIST_REF_VAR,
		ATTR_NULL)
DEF_GCC_BUILTIN(BUILT_IN_STDARG_START,		/* backward compat */
		"__builtin_stdarg_start",
		BT_FN_VOID_VALIST_REF_VAR,
		ATTR_NULL)
DEF_GCC_BUILTIN(BUILT_IN_VA_END,
		"__builtin_va_end",
		BT_FN_VOID_VALIST_REF,
		ATTR_NULL)
DEF_GCC_BUILTIN(BUILT_IN_VA_COPY,
		"__builtin_va_copy",
		BT_FN_VOID_VALIST_REF_VALIST_ARG,
		ATTR_NULL)

DEF_GCC_BUILTIN(BUILT_IN_EXPECT,
		"__builtin_expect",
		BT_FN_LONG_LONG_LONG,
		ATTR_NULL)

/* Declare abort, exit, _exit and _Exit */
DEF_LIB_BUILTIN(BUILT_IN_ABORT,
		 "__builtin_abort",
		BT_FN_VOID,
		ATTR_NORETURN_NOTHROW_LIST)
DEF_LIB_BUILTIN(BUILT_IN_EXIT,
		"__builtin_exit",
		BT_FN_VOID_INT,
		ATTR_NORETURN_NOTHROW_LIST)
DEF_EXT_LIB_BUILTIN(BUILT_IN__EXIT,
		    "__builtin__exit",
		    BT_FN_VOID_INT,
		    ATTR_NORETURN_NOTHROW_LIST)
DEF_C99_BUILTIN(BUILT_IN__EXIT2,
		"__builtin__Exit",
		BT_FN_VOID_INT,
		ATTR_NORETURN_NOTHROW_LIST)

/* Declare malloc, calloc and strdup.  */
DEF_LIB_BUILTIN(BUILT_IN_MALLOC,
		"__builtin_malloc",
		BT_FN_PTR_SIZE,
		ATTR_MALLOC_NOTHROW_LIST)

DEF_LIB_BUILTIN(BUILT_IN_CALLOC,
		"__builtin_calloc",
		BT_FN_PTR_SIZE_SIZE,
		ATTR_MALLOC_NOTHROW_LIST)

DEF_EXT_LIB_BUILTIN(BUILT_IN_STRDUP,
		    "__builtin_strdup",
		    BT_FN_STRING_CONST_STRING,
		    ATTR_MALLOC_NOTHROW_NONNULL_1)