summaryrefslogtreecommitdiff
path: root/gcc/target.def
blob: 35c9799062c57a5426ca8d449826729e11fdad68 (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
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
/* Target hook definitions.
   Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
   Free Software Foundation, Inc.

   This program 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 3, or (at your option) any
   later version.

   This program 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 this program; see the file COPYING3.  If not see
   <http://www.gnu.org/licenses/>.

   In other words, you are welcome to use, share and improve this program.
   You are forbidden to forbid anyone else to use, share and improve
   what you give them.   Help stamp out software-hoarding!  */

/* The following macros should be provided by the including file:

   DEFHOOK(NAME, DOC, TYPE, PARAMS, INIT): Define a function-valued hook.
   DEFHOOKPOD(DOC, TYPE, NAME, INIT): Define a piece-of-data 'hook'.  */

/* Defaults for optional macros:
   DEFHOOKPODX(NAME, TYPE, INIT): Like DEFHOOKPOD, but share documentation
   with the previous 'hook'.  */
#ifndef DEFHOOKPODX
#define DEFHOOKPODX(NAME, TYPE, INIT) DEFHOOKPOD (NAME, 0, TYPE, INIT)
#endif
   
/* HOOKSTRUCT(FRAGMENT): Declarator fragments to encapsulate all the
   members into a struct gcc_target, which in turn contains several
   sub-structs.  */
#ifndef HOOKSTRUCT
#define HOOKSTRUCT(FRAGMENT)
#endif
/* HOOK_VECTOR: Start a struct declaration, which then gets its own initializer.
   HOOK_VECTOR_END: Close a struct declaration, providing a member declarator
                    name for nested use.  */
#ifndef HOOK_VECTOR_1
#define HOOK_VECTOR_1(NAME, FRAGMENT) HOOKSTRUCT(FRAGMENT)
#endif
#define HOOK_VECTOR(INIT_NAME, SNAME) HOOK_VECTOR_1 (INIT_NAME, struct SNAME {)
#define HOOK_VECTOR_END(DECL_NAME) HOOK_VECTOR_1(,} DECL_NAME ;)

HOOK_VECTOR (TARGET_INITIALIZER, gcc_target)

/* FIXME: For pre-existing hooks, we can't place the documentation in the
   documentation field here till we get permission from the FSF to include
   it in GPLed software - the target hook documentation is so far only
   available under the GFDL.  */

/* A hook should generally be documented by a string in the DOC parameter,
   which should contain texinfo markup.  If the documentation is only available
   under the GPL, but not under the GFDL, put it in a comment above the hook
   definition.  If the function declaration is available both under GPL and
   GFDL, but the documentation is only available under the GFDL, put the
   documentaton in tm.texi.in, heading with @hook <hookname> and closing
   the paragraph with @end deftypefn / deftypevr as appropriate, and marking
   the next autogenerated hook with @hook <hookname>.
   In both these cases, leave the DOC string empty, i.e. "".
   Sometimes, for some historic reason the function declaration 
   has to be documented differently
   than what it is.  In that case, use DEFHOOK_UNDOC to supress auto-generation
   of documentation.  DEFHOOK_UNDOC takes a DOC string which it ignores, so
   you can put GPLed documentation string there if you have hopes that you
   can clear the declaration & documentation for GFDL distribution later,
   in which case you can then simply change the DEFHOOK_UNDOC to DEFHOOK
   to turn on the autogeneration of the documentation.

   A documentation string of "*" means not to emit any documentation at all,
   and is mainly used internally for DEFHOOK_UNDOC.  It should generally not
   be used otherwise, but it has its use for exceptional cases where automatic
   documentation is not wanted, and the real documentation is elsewere, like
   for TARGET_ASM_{,UN}ALIGNED_INT_OP, which are hooks only for implementation
   purposes; they refer to structs, the components of which are documented as
   separate hooks TARGET_ASM_{,UN}ALIGNED_[HSDT]I_OP.
   A DOC string of 0 is for internal use of DEFHOOKPODX and special table
   entries only.  */

/* Functions that output assembler for the target.  */
#define HOOK_PREFIX "TARGET_ASM_"
HOOK_VECTOR (TARGET_ASM_OUT, asm_out)

/* Opening and closing parentheses for asm expression grouping.  */
DEFHOOKPOD
(open_paren,
 "",
 const char *, "(")
DEFHOOKPODX (close_paren, const char *, ")")

/* Assembler instructions for creating various kinds of integer object.  */
DEFHOOKPOD
(byte_op,
 "",
 const char *, "\t.byte\t")
DEFHOOKPOD (aligned_op, "*", struct asm_int_op, TARGET_ASM_ALIGNED_INT_OP)
DEFHOOKPOD (unaligned_op, "*", struct asm_int_op, TARGET_ASM_UNALIGNED_INT_OP)

/* Try to output the assembler code for an integer object whose
   value is given by X.  SIZE is the size of the object in bytes and
   ALIGNED_P indicates whether it is aligned.  Return true if
   successful.  Only handles cases for which BYTE_OP, ALIGNED_OP
   and UNALIGNED_OP are NULL.  */
DEFHOOK
(integer,
 "",
 /* Only handles cases for which BYTE_OP, ALIGNED_OP and UNALIGNED_OP are
    NULL.  */
 bool, (rtx x, unsigned int size, int aligned_p),
 default_assemble_integer)

/* Output code that will globalize a label.  */
DEFHOOK
(globalize_label,
 "",
 void, (FILE *stream, const char *name),
 default_globalize_label)

/* Output code that will globalize a declaration.  */
DEFHOOK
(globalize_decl_name,
 "",
 void, (FILE *stream, tree decl), default_globalize_decl_name)

/* Output code that will emit a label for unwind info, if this
   target requires such labels.  Second argument is the decl the
   unwind info is associated with, third is a boolean: true if
   this is for exception handling, fourth is a boolean: true if
   this is only a placeholder for an omitted FDE.  */
DEFHOOK
(emit_unwind_label,
 "",
 void, (FILE *stream, tree decl, int for_eh, int empty),
 default_emit_unwind_label)

/* Output code that will emit a label to divide up the exception table.  */
DEFHOOK
(emit_except_table_label,
 "",
 void, (FILE *stream),
 default_emit_except_table_label)

/* Emit a directive for setting the personality for the function.  */
DEFHOOK
(emit_except_personality,
 "If the target implements @code{TARGET_ASM_UNWIND_EMIT}, this hook may be\
 used to emit a directive to install a personality hook into the unwind\
 info.  This hook should not be used if dwarf2 unwind info is used.",
 void, (rtx personality),
 NULL)

/* Emit any directives required to unwind this instruction.  */
DEFHOOK
(unwind_emit,
 "",
 void, (FILE *stream, rtx insn),
 NULL)

DEFHOOKPOD
(unwind_emit_before_insn,
 "True if the @code{TARGET_ASM_UNWIND_EMIT} hook should be called before\
 the assembly for @var{insn} has been emitted, false if the hook should\
 be called afterward.",
 bool, true)

/* Output an internal label.  */
DEFHOOK
(internal_label,
 "",
 void, (FILE *stream, const char *prefix, unsigned long labelno),
 default_internal_label)

/* Output label for the constant.  */
DEFHOOK
(declare_constant_name,
 "",
 void, (FILE *file, const char *name, const_tree expr, HOST_WIDE_INT size),
 default_asm_declare_constant_name)

/* Emit a ttype table reference to a typeinfo object.  */
DEFHOOK
(ttype,
 "",
 bool, (rtx sym),
 hook_bool_rtx_false)

/* Emit an assembler directive to set visibility for the symbol
   associated with the tree decl.  */
DEFHOOK
(assemble_visibility,
 "",
 void, (tree decl, int visibility),
 default_assemble_visibility)

/* Output the assembler code for entry to a function.  */
DEFHOOK
(function_prologue,
 "",
 void, (FILE *file, HOST_WIDE_INT size),
 default_function_pro_epilogue)

/* Output the assembler code for end of prologue.  */
DEFHOOK
(function_end_prologue,
 "",
 void, (FILE *file),
 no_asm_to_stream)

/* Output the assembler code for start of epilogue.  */
DEFHOOK
(function_begin_epilogue,
 "",
 void, (FILE *file),
 no_asm_to_stream)

/* Output the assembler code for function exit.  */
DEFHOOK
(function_epilogue,
 "",
 void, (FILE *file, HOST_WIDE_INT size),
 default_function_pro_epilogue)

/* Initialize target-specific sections.  */
DEFHOOK
(init_sections,
 "",
 void, (void),
 hook_void_void)

/* Tell assembler to change to section NAME with attributes FLAGS.
   If DECL is non-NULL, it is the VAR_DECL or FUNCTION_DECL with
   which this section is associated.  */
DEFHOOK
(named_section,
 "",
 void, (const char *name, unsigned int flags, tree decl),
 default_no_named_section)

/* Return a mask describing how relocations should be treated when
   selecting sections.  Bit 1 should be set if global relocations
   should be placed in a read-write section; bit 0 should be set if
   local relocations should be placed in a read-write section.  */
DEFHOOK
(reloc_rw_mask,
 "",
 int, (void),
 default_reloc_rw_mask)

 /* Return a section for EXP.  It may be a DECL or a constant.  RELOC
    is nonzero if runtime relocations must be applied; bit 1 will be
    set if the runtime relocations require non-local name resolution.
    ALIGN is the required alignment of the data.  */
DEFHOOK
(select_section,
 "",
 section *, (tree exp, int reloc, unsigned HOST_WIDE_INT align),
 default_select_section)

/* Return a section for X.  MODE is X's mode and ALIGN is its
   alignment in bits.  */
DEFHOOK
(select_rtx_section,
 "",
 section *, (enum machine_mode mode, rtx x, unsigned HOST_WIDE_INT align),
 default_select_rtx_section)

/* Select a unique section name for DECL.  RELOC is the same as
   for SELECT_SECTION.  */
DEFHOOK
(unique_section,
 "",
 void, (tree decl, int reloc),
 default_unique_section)

/* Return the readonly data section associated with function DECL.  */
DEFHOOK
(function_rodata_section,
 "",
 section *, (tree decl),
 default_function_rodata_section)

/* Output a constructor for a symbol with a given priority.  */
DEFHOOK
(constructor,
 "",
 void, (rtx symbol, int priority), NULL)

/* Output a destructor for a symbol with a given priority.  */
DEFHOOK
(destructor,
 "",
 void, (rtx symbol, int priority), NULL)

/* Output the assembler code for a thunk function.  THUNK_DECL is the
   declaration for the thunk function itself, FUNCTION is the decl for
   the target function.  DELTA is an immediate constant offset to be
   added to THIS.  If VCALL_OFFSET is nonzero, the word at
   *(*this + vcall_offset) should be added to THIS.  */
DEFHOOK
(output_mi_thunk,
 "",
 void, (FILE *file, tree thunk_fndecl, HOST_WIDE_INT delta,
	HOST_WIDE_INT vcall_offset, tree function),
 NULL)

/* Determine whether output_mi_thunk would succeed.  */
/* ??? Ideally, this hook would not exist, and success or failure
   would be returned from output_mi_thunk directly.  But there's
   too much undo-able setup involved in invoking output_mi_thunk.
   Could be fixed by making output_mi_thunk emit rtl instead of
   text to the output file.  */
DEFHOOK
(can_output_mi_thunk,
 "",
 bool, (const_tree thunk_fndecl, HOST_WIDE_INT delta,
	HOST_WIDE_INT vcall_offset, const_tree function),
 hook_bool_const_tree_hwi_hwi_const_tree_false)

/* Output any boilerplate text needed at the beginning of a
   translation unit.  */
DEFHOOK
(file_start,
 "",
 void, (void),
 default_file_start)

/* Output any boilerplate text needed at the end of a translation unit.  */
DEFHOOK
(file_end,
 "",
 void, (void),
 hook_void_void)

/* Output any boilerplate text needed at the beginning of an
   LTO output stream.  */
DEFHOOK
(lto_start,
 "",
 void, (void),
 hook_void_void)

/* Output any boilerplate text needed at the end of an
   LTO output stream.  */
DEFHOOK
(lto_end,
 "",
 void, (void),
 hook_void_void)

/* Output any boilerplace text needed at the end of a
   translation unit before debug and unwind info is emitted.  */
DEFHOOK
(code_end,
 "",
 void, (void),
 hook_void_void)

/* Output an assembler pseudo-op to declare a library function name
   external.  */
DEFHOOK
(external_libcall,
 "",
 void, (rtx symref),
 default_external_libcall)

/* Output an assembler directive to mark decl live. This instructs
   linker to not dead code strip this symbol.  */
DEFHOOK
(mark_decl_preserved,
 "",
 void, (const char *symbol),
 hook_void_constcharptr)

/* Output a record of the command line switches that have been passed.  */
DEFHOOK
(record_gcc_switches,
 "",
 int, (print_switch_type type, const char *text),
 NULL)

/* The name of the section that the example ELF implementation of
   record_gcc_switches will use to store the information.  Target
   specific versions of record_gcc_switches may or may not use
   this information.  */
DEFHOOKPOD
(record_gcc_switches_section,
 "",
 const char *, ".GCC.command.line")

/* Output the definition of a section anchor.  */
DEFHOOK
(output_anchor,
 "",
 void, (rtx x),
 default_asm_output_anchor)

/* Output a DTP-relative reference to a TLS symbol.  */
DEFHOOK
(output_dwarf_dtprel,
 "",
 void, (FILE *file, int size, rtx x),
 NULL)

/* Some target machines need to postscan each insn after it is output.  */
DEFHOOK
(final_postscan_insn,
 "",
 void, (FILE *file, rtx insn, rtx *opvec, int noperands),
 NULL)

/* Emit the trampoline template.  This hook may be NULL.  */
DEFHOOK
(trampoline_template,
 "",
 void, (FILE *f),
 NULL)

DEFHOOK
(output_source_filename,
 "Output COFF information or DWARF debugging information which indicates\
 that filename @var{name} is the current source file to the stdio\
 stream @var{file}.\n\
 \n\
 This target hook need not be defined if the standard form of output\
 for the file format in use is appropriate.",
 void ,(FILE *file, const char *name),
 default_asm_output_source_filename)

DEFHOOK
(output_addr_const_extra,
 "",
 bool, (FILE *file, rtx x),
 default_asm_output_addr_const_extra)

/* ??? The TARGET_PRINT_OPERAND* hooks are part of the asm_out struct,
   even though that is not reflected in the macro name to override their
   initializers.  */
#undef HOOK_PREFIX
#define HOOK_PREFIX "TARGET_"

/* Emit a machine-specific insn operand.  */
/* ??? tm.texi only documents the old macro PRINT_OPERAND,
   not this  hook, and uses a different name for the argument FILE.  */
DEFHOOK_UNDOC
(print_operand,
 "",
 void, (FILE *file, rtx x, int code),
 default_print_operand)

/* Emit a machine-specific memory address.  */
/* ??? tm.texi only documents the old macro PRINT_OPERAND_ADDRESS,
   not this  hook, and uses different argument names.  */
DEFHOOK_UNDOC
(print_operand_address,
 "",
 void, (FILE *file, rtx addr),
 default_print_operand_address)

/* Determine whether CODE is a valid punctuation character for the
   `print_operand' hook.  */
/* ??? tm.texi only documents the old macro PRINT_OPERAND_PUNCT_VALID_P,
   not this  hook.  */
DEFHOOK_UNDOC
(print_operand_punct_valid_p,
 "",
 bool ,(unsigned char code),
 default_print_operand_punct_valid_p)

HOOK_VECTOR_END (asm_out)

/* Functions relating to instruction scheduling.  All of these
   default to null pointers, which haifa-sched.c looks for and handles.  */
#undef HOOK_PREFIX
#define HOOK_PREFIX "TARGET_SCHED_"
HOOK_VECTOR (TARGET_SCHED, sched)

/* Given the current cost, COST, of an insn, INSN, calculate and
   return a new cost based on its relationship to DEP_INSN through
   the dependence LINK.  The default is to make no adjustment.  */
DEFHOOK
(adjust_cost,
 "",
 int, (rtx insn, rtx link, rtx dep_insn, int cost), NULL)

/* Adjust the priority of an insn as you see fit.  Returns the new priority.  */
DEFHOOK
(adjust_priority,
 "",
 int, (rtx insn, int priority), NULL)

/* Function which returns the maximum number of insns that can be
   scheduled in the same machine cycle.  This must be constant
   over an entire compilation.  The default is 1.  */
DEFHOOK
(issue_rate,
 "",
 int, (void), NULL)

/* Calculate how much this insn affects how many more insns we
   can emit this cycle.  Default is they all cost the same.  */
DEFHOOK
(variable_issue,
 "",
 int, (FILE *file, int verbose, rtx insn, int more), NULL)

/* Initialize machine-dependent scheduling code.  */
DEFHOOK
(init,
 "",
 void, (FILE *file, int verbose, int max_ready), NULL)

/* Finalize machine-dependent scheduling code.  */
DEFHOOK
(finish,
 "",
 void, (FILE *file, int verbose), NULL)

 /* Initialize machine-dependent function wide scheduling code.  */
DEFHOOK
(init_global,
 "",
 void, (FILE *file, int verbose, int old_max_uid), NULL)

/* Finalize machine-dependent function wide scheduling code.  */
DEFHOOK
(finish_global,
 "",
 void, (FILE *file, int verbose), NULL)

/* Reorder insns in a machine-dependent fashion, in two different
       places.  Default does nothing.  */
DEFHOOK
(reorder,
 "",
 int, (FILE *file, int verbose, rtx *ready, int *n_readyp, int clock), NULL)

DEFHOOK
(reorder2,
 "",
 int, (FILE *file, int verbose, rtx *ready, int *n_readyp, int clock), NULL)

/* The following member value is a pointer to a function called
   after evaluation forward dependencies of insns in chain given
   by two parameter values (head and tail correspondingly).  */
DEFHOOK
(dependencies_evaluation_hook,
 "",
 void, (rtx head, rtx tail), NULL)

/* The values of the following four members are pointers to functions
   used to simplify the automaton descriptions.  dfa_pre_cycle_insn and
   dfa_post_cycle_insn give functions returning insns which are used to
   change the pipeline hazard recognizer state when the new simulated
   processor cycle correspondingly starts and finishes.  The function
   defined by init_dfa_pre_cycle_insn and init_dfa_post_cycle_insn are
   used to initialize the corresponding insns.  The default values of
   the members result in not changing the automaton state when the
   new simulated processor cycle correspondingly starts and finishes.  */

DEFHOOK
(init_dfa_pre_cycle_insn,
 "",
 void, (void), NULL)

DEFHOOK
(dfa_pre_cycle_insn,
 "",
 rtx, (void), NULL)

DEFHOOK
(init_dfa_post_cycle_insn,
 "",
 void, (void), NULL)

DEFHOOK
(dfa_post_cycle_insn,
 "",
 rtx, (void), NULL)

/* The values of the following two members are pointers to
   functions used to simplify the automaton descriptions.
   dfa_pre_advance_cycle and dfa_post_advance_cycle are getting called
   immediately before and after cycle is advanced.  */

DEFHOOK
(dfa_pre_advance_cycle,
 "",
 void, (void), NULL)

DEFHOOK
(dfa_post_advance_cycle,
 "",
 void, (void), NULL)

/* The following member value is a pointer to a function returning value
   which defines how many insns in queue `ready' will we try for
   multi-pass scheduling.  If the member value is nonzero and the
   function returns positive value, the DFA based scheduler will make
   multi-pass scheduling for the first cycle.  In other words, we will
   try to choose ready insn which permits to start maximum number of
   insns on the same cycle.  */
DEFHOOK
(first_cycle_multipass_dfa_lookahead,
 "",
 int, (void), NULL)

/* The following member value is pointer to a function controlling
   what insns from the ready insn queue will be considered for the
   multipass insn scheduling.  If the hook returns zero for insn
   passed as the parameter, the insn will be not chosen to be issued.  */
DEFHOOK
(first_cycle_multipass_dfa_lookahead_guard,
 "",
 int, (rtx insn), NULL)

/* The following member value is pointer to a function called by
   the insn scheduler before issuing insn passed as the third
   parameter on given cycle.  If the hook returns nonzero, the
   insn is not issued on given processors cycle.  Instead of that,
   the processor cycle is advanced.  If the value passed through
   the last parameter is zero, the insn ready queue is not sorted
   on the new cycle start as usually.  The first parameter passes
   file for debugging output.  The second one passes the scheduler
   verbose level of the debugging output.  The forth and the fifth
   parameter values are correspondingly processor cycle on which
   the previous insn has been issued and the current processor cycle.  */
DEFHOOK
(dfa_new_cycle,
 "",
 int, (FILE *dump, int verbose, rtx insn, int last_clock,
       int clock, int *sort_p),
 NULL)

/* The following member value is a pointer to a function called by the
   insn scheduler.  It should return true if there exists a dependence
   which is considered costly by the target, between the insn
   DEP_PRO (&_DEP), and the insn DEP_CON (&_DEP).  The first parameter is
   the dep that represents the dependence between the two insns.  The
   second argument is the cost of the dependence as estimated by
   the scheduler.  The last argument is the distance in cycles
   between the already scheduled insn (first parameter) and the
   second insn (second parameter).  */
DEFHOOK
(is_costly_dependence,
 "",
 bool, (struct _dep *_dep, int cost, int distance), NULL)

DEFHOOK_UNDOC
(adjust_cost_2,
 "Given the current cost, @var{cost}, of an insn, @var{insn}, calculate and\
 return a new cost based on its relationship to @var{dep_insn} through the\
 dependence of weakness @var{dw}.  The default is to make no adjustment.",
 int, (rtx insn, int dep_type1, rtx dep_insn, int cost, int dw), NULL)

/* The following member value is a pointer to a function called
   by the insn scheduler. This hook is called to notify the backend
   that new instructions were emitted.  */
DEFHOOK
(h_i_d_extended,
 "",
 void, (void), NULL)

/* Next 5 functions are for multi-point scheduling.  */

/* Allocate memory for scheduler context.  */
DEFHOOK
(alloc_sched_context,
 "",
 void *, (void), NULL)

/* Fills the context from the local machine scheduler context.  */
DEFHOOK
(init_sched_context,
 "",
 void, (void *tc, bool clean_p), NULL)

/* Sets local machine scheduler context to a saved value.  */
DEFHOOK
(set_sched_context,
 "",
 void, (void *tc), NULL)

/* Clears a scheduler context so it becomes like after init.  */
DEFHOOK
(clear_sched_context,
 "",
 void, (void *tc), NULL)

/* Frees the scheduler context.  */
DEFHOOK
(free_sched_context,
 "",
 void, (void *tc), NULL)

/* The following member value is a pointer to a function called
   by the insn scheduler.
   The first parameter is an instruction, the second parameter is the type
   of the requested speculation, and the third parameter is a pointer to the
   speculative pattern of the corresponding type (set if return value == 1).
   It should return
   -1, if there is no pattern, that will satisfy the requested speculation type,
   0, if current pattern satisfies the requested speculation type,
   1, if pattern of the instruction should be changed to the newly
   generated one.  */
DEFHOOK
(speculate_insn,
 "",
 int, (rtx insn, int request, rtx *new_pat), NULL)

/* The following member value is a pointer to a function called
   by the insn scheduler.  It should return true if the check instruction
   passed as the parameter needs a recovery block.  */
DEFHOOK
(needs_block_p,
 "",
 bool, (int dep_status), NULL)

/* The following member value is a pointer to a function called
   by the insn scheduler.  It should return a pattern for the check
   instruction.
   The first parameter is a speculative instruction, the second parameter
   is the label of the corresponding recovery block (or null, if it is a
   simple check).  If the mutation of the check is requested (e.g. from
   ld.c to chk.a), the third parameter is true - in this case the first
   parameter is the previous check.  */
DEFHOOK
(gen_spec_check,
 "",
 rtx, (rtx insn, rtx label, int mutate_p), NULL)

/* The following member value is a pointer to a function controlling
   what insns from the ready insn queue will be considered for the
   multipass insn scheduling.  If the hook returns zero for the insn
   passed as the parameter, the insn will not be chosen to be
   issued.  This hook is used to discard speculative instructions,
   that stand at the first position of the ready list.  */
DEFHOOK
(first_cycle_multipass_dfa_lookahead_guard_spec,
 "",
 bool, (const_rtx insn), NULL)

/* The following member value is a pointer to a function that provides
   information about the speculation capabilities of the target.
   The parameter is a pointer to spec_info variable.  */
DEFHOOK
(set_sched_flags,
 "",
 void, (struct spec_info_def *spec_info), NULL)

DEFHOOK_UNDOC
(get_insn_spec_ds,
 "Return speculation types of instruction @var{insn}.",
 int, (rtx insn), NULL)

DEFHOOK_UNDOC
(get_insn_checked_ds,
 "Return speculation types that are checked for instruction @var{insn}",
 int, (rtx insn), NULL)

DEFHOOK_UNDOC
(skip_rtx_p,
 "Return bool if rtx scanning should just skip current layer and\
 advance to the inner rtxes.",
 bool, (const_rtx x), NULL)

/* The following member value is a pointer to a function that provides
   information about the target resource-based lower bound which is
   used by the swing modulo scheduler.  The parameter is a pointer
   to ddg variable.  */
DEFHOOK
(sms_res_mii,
 "",
 int, (struct ddg *g), NULL)

/* The following member value is a function that initializes dispatch
   schedling and adds instructions to dispatch window according to its
   parameters.  */
DEFHOOK
(dispatch_do,
"",
void, (rtx insn, int x),
hook_void_rtx_int)

/* The following member value is a a function that returns true is
   dispatch schedling is supported in hardware and condition passed
   as the second parameter is true.  */
DEFHOOK
(dispatch,
"",
bool, (rtx insn, int x),
hook_bool_rtx_int_false)

HOOK_VECTOR_END (sched)

/* Functions relating to vectorization.  */
#undef HOOK_PREFIX
#define HOOK_PREFIX "TARGET_VECTORIZE_"
HOOK_VECTOR (TARGET_VECTORIZE, vectorize)

/* The following member value is a pointer to a function called
   by the vectorizer, and return the decl of the target builtin
   function.  */
DEFHOOK
(builtin_mask_for_load,
 "",
 tree, (void), NULL)

/* Returns a code for builtin that realizes vectorized version of
   function, or NULL_TREE if not available.  */
DEFHOOK
(builtin_vectorized_function,
 "",
 tree, (tree fndecl, tree vec_type_out, tree vec_type_in),
 default_builtin_vectorized_function)

/* Returns a function declaration for a builtin that realizes the
   vector conversion, or NULL_TREE if not available.  */
DEFHOOK
(builtin_conversion,
 "",
 tree, (unsigned code, tree dest_type, tree src_type),
 default_builtin_vectorized_conversion)

/* Target builtin that implements vector widening multiplication.
   builtin_mul_widen_eve computes the element-by-element products
   for the even elements, and builtin_mul_widen_odd computes the
   element-by-element products for the odd elements.  */
DEFHOOK
(builtin_mul_widen_even,
 "",
 tree, (tree x), NULL)

DEFHOOK
(builtin_mul_widen_odd,
 "",
 tree, (tree x), NULL)

/* Cost of different vector/scalar statements in vectorization cost
   model. In case of misaligned vector loads and stores the cost depends
   on the data type and misalignment value.  */
DEFHOOK
(builtin_vectorization_cost,
 "",
 int, (enum vect_cost_for_stmt type_of_cost, tree vectype, int misalign),
 default_builtin_vectorization_cost)

/* Return true if vector alignment is reachable (by peeling N
   iterations) for the given type.  */
DEFHOOK
(vector_alignment_reachable,
 "",
 bool, (const_tree type, bool is_packed),
 default_builtin_vector_alignment_reachable)

/* Target builtin that implements vector permute.  */
DEFHOOK
(builtin_vec_perm,
 "",
 tree, (tree type, tree *mask_element_type), NULL)

/* Return true if a vector created for builtin_vec_perm is valid.  */
DEFHOOK
(builtin_vec_perm_ok,
 "",
 bool, (tree vec_type, tree mask),
 hook_bool_tree_tree_true)

/* Return true if the target supports misaligned store/load of a
   specific factor denoted in the third parameter.  The last parameter
   is true if the access is defined in a packed struct.  */
DEFHOOK
(support_vector_misalignment,
 "",
 bool,
 (enum machine_mode mode, const_tree type, int misalignment, bool is_packed),
 default_builtin_support_vector_misalignment)

/* Return units per SIMD word.  */
DEFHOOK
(units_per_simd_word,
 "",
 unsigned int,
 (enum machine_mode mode),
 default_units_per_simd_word)

HOOK_VECTOR_END (vectorize)

#undef HOOK_PREFIX
#define HOOK_PREFIX "TARGET_"

/* The initial value of target_flags.  */
DEFHOOKPOD
(default_target_flags,
 "",
 int, 0)

/* Allow target specific overriding of option settings after options have
  been changed by an attribute or pragma or when it is reset at the
  end of the code affected by an attribute or pragma.  */
DEFHOOK
(override_options_after_change,
 "",
 void, (void),
 hook_void_void)

/* Handle target switch CODE (an OPT_* value).  ARG is the argument
   passed to the switch; it is NULL if no argument was.  VALUE is the
   value of ARG if CODE specifies a UInteger option, otherwise it is
   1 if the positive form of the switch was used and 0 if the negative
   form was.  Return true if the switch was valid.  */
DEFHOOK
(handle_option,
 "",
 bool, (size_t code, const char *arg, int value),
 hook_bool_size_t_constcharptr_int_true)

/* ??? Documenting this hook requires a GFDL license grant.  */
DEFHOOK_UNDOC
(handle_ofast,
 "Handle target-specific parts of specifying -Ofast.",
 void, (void),
 hook_void_void)

/* Display extra, target specific information in response to a
   --target-help switch.  */
DEFHOOK
(help,
 "",
 void, (void), NULL)

DEFHOOK_UNDOC
(eh_return_filter_mode,
 "Return machine mode for filter value.",
 enum machine_mode, (void),
 default_eh_return_filter_mode)

/* Return machine mode for libgcc expanded cmp instructions.  */
DEFHOOK
(libgcc_cmp_return_mode,
 "",
 enum machine_mode, (void),
 default_libgcc_cmp_return_mode)

/* Return machine mode for libgcc expanded shift instructions.  */
DEFHOOK
(libgcc_shift_count_mode,
 "",
 enum machine_mode, (void),
 default_libgcc_shift_count_mode)

/* Return machine mode to be used for _Unwind_Word type.  */
DEFHOOK
(unwind_word_mode,
 "",
 enum machine_mode, (void),
 default_unwind_word_mode)

/* Given two decls, merge their attributes and return the result.  */
DEFHOOK
(merge_decl_attributes,
 "",
 tree, (tree olddecl, tree newdecl),
 merge_decl_attributes)

/* Given two types, merge their attributes and return the result.  */
DEFHOOK
(merge_type_attributes,
 "",
 tree, (tree type1, tree type2),
 merge_type_attributes)

/* Table of machine attributes and functions to handle them.
   Ignored if NULL.  */
DEFHOOKPOD
(attribute_table,
 "",
 const struct attribute_spec *, NULL)

/* Return true iff attribute NAME expects a plain identifier as its first
   argument.  */
DEFHOOK
(attribute_takes_identifier_p,
 "",
 bool, (const_tree name),
 hook_bool_const_tree_false)

/* Return zero if the attributes on TYPE1 and TYPE2 are incompatible,
   one if they are compatible and two if they are nearly compatible
   (which causes a warning to be generated).  */
DEFHOOK
(comp_type_attributes,
 "",
 int, (const_tree type1, const_tree type2),
 hook_int_const_tree_const_tree_1)

/* Assign default attributes to the newly defined TYPE.  */
DEFHOOK
(set_default_type_attributes,
 "",
 void, (tree type),
 hook_void_tree)

/* Insert attributes on the newly created DECL.  */
DEFHOOK
(insert_attributes,
 "",
 void, (tree node, tree *attr_ptr),
 hook_void_tree_treeptr)

/* Return true if FNDECL (which has at least one machine attribute)
   can be inlined despite its machine attributes, false otherwise.  */
DEFHOOK
(function_attribute_inlinable_p,
 "",
 bool, (const_tree fndecl),
 hook_bool_const_tree_false)

/* Return true if bitfields in RECORD_TYPE should follow the
   Microsoft Visual C++ bitfield layout rules.  */
DEFHOOK
(ms_bitfield_layout_p,
 "",
 bool, (const_tree record_type),
 hook_bool_const_tree_false)

/* True if the target supports decimal floating point.  */
DEFHOOK
(decimal_float_supported_p,
 "",
 bool, (void),
 default_decimal_float_supported_p)

/* True if the target supports fixed-point.  */
DEFHOOK
(fixed_point_supported_p,
 "",
 bool, (void),
 default_fixed_point_supported_p)

/* Return true if anonymous bitfields affect structure alignment.  */
DEFHOOK
(align_anon_bitfield,
 "",
 bool, (void),
 hook_bool_void_false)

/* Return true if volatile bitfields should use the narrowest type possible.
   Return false if they should use the container type.  */
DEFHOOK
(narrow_volatile_bitfield,
 "",
 bool, (void),
 hook_bool_void_false)

/* Set up target-specific built-in functions.  */
DEFHOOK
(init_builtins,
 "",
 void, (void),
 hook_void_void)

/* Initialize (if INITIALIZE_P is true) and return the target-specific
   built-in function decl for CODE.
   Return NULL if that is not possible.  Return error_mark_node if CODE
   is outside of the range of valid target builtin function codes.  */
DEFHOOK
(builtin_decl,
 "",
 tree, (unsigned code, bool initialize_p), NULL)

/* Expand a target-specific builtin.  */
DEFHOOK
(expand_builtin,
 "",
 rtx,
 (tree exp, rtx target, rtx subtarget, enum machine_mode mode, int ignore),
 default_expand_builtin)

/* Select a replacement for a target-specific builtin.  This is done
   *before* regular type checking, and so allows the target to
   implement a crude form of function overloading.  The result is a
   complete expression that implements the operation.  PARAMS really
   has type VEC(tree,gc)*, but we don't want to include tree.h here.  */
DEFHOOK
(resolve_overloaded_builtin,
 "",
 tree, (unsigned int /*location_t*/ loc, tree fndecl, void *arglist), NULL)

/* Fold a target-specific builtin.  */
DEFHOOK
(fold_builtin,
 "",
 tree, (tree fndecl, int n_args, tree *argp, bool ignore),
 hook_tree_tree_int_treep_bool_null)

/* Returns a code for a target-specific builtin that implements
   reciprocal of the function, or NULL_TREE if not available.  */
DEFHOOK
(builtin_reciprocal,
 "",
 tree, (unsigned fn, bool md_fn, bool sqrt),
 default_builtin_reciprocal)

/* For a vendor-specific TYPE, return a pointer to a statically-allocated
   string containing the C++ mangling for TYPE.  In all other cases, return
   NULL.  */
DEFHOOK
(mangle_type,
 "",
 const char *, (const_tree type),
 hook_constcharptr_const_tree_null)

/* Make any adjustments to libfunc names needed for this target.  */
DEFHOOK
(init_libfuncs,
 "",
 void, (void),
 hook_void_void)

/* Given a decl, a section name, and whether the decl initializer
   has relocs, choose attributes for the section.  */
/* ??? Should be merged with SELECT_SECTION and UNIQUE_SECTION.  */
DEFHOOK
(section_type_flags,
 "",
 unsigned int, (tree decl, const char *name, int reloc),
 default_section_type_flags)

/* True if new jumps cannot be created, to replace existing ones or
   not, at the current point in the compilation.  */
DEFHOOK
(cannot_modify_jumps_p,
 "",
 bool, (void),
 hook_bool_void_false)

/* Return a register class for which branch target register
   optimizations should be applied.  */
DEFHOOK
(branch_target_register_class,
 "",
 reg_class_t, (void),
 default_branch_target_register_class)

/* Return true if branch target register optimizations should include
   callee-saved registers that are not already live during the current
   function.  AFTER_PE_GEN is true if prologues and epilogues have
   already been generated.  */
DEFHOOK
(branch_target_register_callee_saved,
 "",
 bool, (bool after_prologue_epilogue_gen),
 hook_bool_bool_false)

/* Return true if the target supports conditional execution.  */
DEFHOOK
(have_conditional_execution,
 "",
 bool, (void),
 default_have_conditional_execution)

/* Return a new value for loop unroll size.  */
DEFHOOK
(loop_unroll_adjust,
 "",
 unsigned, (unsigned nunroll, struct loop *loop),
 NULL)

/* True if the constant X cannot be placed in the constant pool.  */
DEFHOOK
(cannot_force_const_mem,
 "",
 bool, (rtx x),
 hook_bool_rtx_false)

DEFHOOK_UNDOC
(cannot_copy_insn_p,
 "True if the insn @var{x} cannot be duplicated.",
 bool, (rtx), NULL)

/* True if X is considered to be commutative.  */
DEFHOOK
(commutative_p,
 "",
 bool, (const_rtx x, int outer_code),
 hook_bool_const_rtx_commutative_p)

/* True if ADDR is an address-expression whose effect depends
   on the mode of the memory reference it is used in.  */
DEFHOOK
(mode_dependent_address_p,
 "",
 bool, (const_rtx addr),
 default_mode_dependent_address_p)

/* Given an invalid address X for a given machine mode, try machine-specific
   ways to make it legitimate.  Return X or an invalid address on failure.  */
DEFHOOK
(legitimize_address,
 "",
 rtx, (rtx x, rtx oldx, enum machine_mode mode),
 default_legitimize_address)

/* Given an address RTX, undo the effects of LEGITIMIZE_ADDRESS.  */
DEFHOOK
(delegitimize_address,
 "",
 rtx, (rtx x),
 delegitimize_mem_from_attrs)

/* Given an address RTX, say whether it is valid.  */
DEFHOOK
(legitimate_address_p,
 "",
 bool, (enum machine_mode mode, rtx x, bool strict),
 default_legitimate_address_p)

/* True if the given constant can be put into an object_block.  */
DEFHOOK
(use_blocks_for_constant_p,
 "",
 bool, (enum machine_mode mode, const_rtx x),
 hook_bool_mode_const_rtx_false)

/* The minimum and maximum byte offsets for anchored addresses.  */
DEFHOOKPOD
(min_anchor_offset,
 "",
 HOST_WIDE_INT, 0)

DEFHOOKPOD
(max_anchor_offset,
 "",
 HOST_WIDE_INT, 0)

/* True if section anchors can be used to access the given symbol.  */
DEFHOOK
(use_anchors_for_symbol_p,
 "",
 bool, (const_rtx x),
 default_use_anchors_for_symbol_p)

/* True if it is OK to do sibling call optimization for the specified
   call expression EXP.  DECL will be the called function, or NULL if
   this is an indirect call.  */
DEFHOOK
(function_ok_for_sibcall,
 "",
 bool, (tree decl, tree exp),
 hook_bool_tree_tree_false)

/* Establish appropriate back-end context for processing the function
   FNDECL.  The argument might be NULL to indicate processing at top
   level, outside of any function scope.  */
DEFHOOK
(set_current_function,
 "",
 void, (tree decl), hook_void_tree)

/* True if EXP should be placed in a "small data" section.  */
DEFHOOK
(in_small_data_p,
 "",
 bool, (const_tree exp),
 hook_bool_const_tree_false)

/* True if EXP names an object for which name resolution must resolve
   to the current executable or shared library.  */
DEFHOOK
(binds_local_p,
 "",
 bool, (const_tree exp),
 default_binds_local_p)

/* Check if profiling code is before or after prologue.  */
DEFHOOK
(profile_before_prologue,
 "It returns true if target wants profile code emitted before prologue.\n\n\
The default version of this hook use the target macro\n\
@code{PROFILE_BEFORE_PROLOGUE}.",
 bool, (void),
 default_profile_before_prologue)

/* Modify and return the identifier of a DECL's external name,
   originally identified by ID, as required by the target,
   (eg, append @nn to windows32 stdcall function names).
   The default is to return ID without modification. */
DEFHOOK
(mangle_decl_assembler_name,
 "",
 tree, (tree decl, tree  id),
 default_mangle_decl_assembler_name)

/* Do something target-specific to record properties of the DECL into
   the associated SYMBOL_REF.  */
DEFHOOK
(encode_section_info,
 "",
 void, (tree decl, rtx rtl, int new_decl_p),
 default_encode_section_info)

/* Undo the effects of encode_section_info on the symbol string.  */
DEFHOOK
(strip_name_encoding,
 "",
 const char *, (const char *name),
 default_strip_name_encoding)

/* If shift optabs for MODE are known to always truncate the shift count,
   return the mask that they apply.  Return 0 otherwise.  */
DEFHOOK
(shift_truncation_mask,
 "",
 unsigned HOST_WIDE_INT, (enum machine_mode mode),
 default_shift_truncation_mask)

/* Return the number of divisions in the given MODE that should be present,
   so that it is profitable to turn the division into a multiplication by
   the reciprocal.  */
DEFHOOK
(min_divisions_for_recip_mul,
 "",
 unsigned int, (enum machine_mode mode),
 default_min_divisions_for_recip_mul)

/* If the representation of integral MODE is such that values are
   always sign-extended to a wider mode MODE_REP then return
   SIGN_EXTEND.  Return UNKNOWN otherwise.  */
/* Note that the return type ought to be RTX_CODE, but that's not
   necessarily defined at this point.  */
DEFHOOK
(mode_rep_extended,
 "",
 int, (enum machine_mode mode, enum machine_mode rep_mode),
 default_mode_rep_extended)

/* True if MODE is valid for a pointer in __attribute__((mode("MODE"))).  */
DEFHOOK
(valid_pointer_mode,
 "",
 bool, (enum machine_mode mode),
 default_valid_pointer_mode)

/* Support for named address spaces.  */
#undef HOOK_PREFIX
#define HOOK_PREFIX "TARGET_ADDR_SPACE_"
HOOK_VECTOR (TARGET_ADDR_SPACE_HOOKS, addr_space)

/* MODE to use for a pointer into another address space.  */
DEFHOOK
(pointer_mode,
 "",
 enum machine_mode, (addr_space_t address_space),
 default_addr_space_pointer_mode)

/* MODE to use for an address in another address space.  */
DEFHOOK
(address_mode,
 "",
 enum machine_mode, (addr_space_t address_space),
 default_addr_space_address_mode)

/* True if MODE is valid for a pointer in __attribute__((mode("MODE")))
   in another address space.  */
DEFHOOK
(valid_pointer_mode,
 "",
 bool, (enum machine_mode mode, addr_space_t as),
 default_addr_space_valid_pointer_mode)

/* True if an address is a valid memory address to a given named address
   space for a given mode.  */
DEFHOOK
(legitimate_address_p,
 "",
 bool, (enum machine_mode mode, rtx exp, bool strict, addr_space_t as),
 default_addr_space_legitimate_address_p)

/* Return an updated address to convert an invalid pointer to a named
   address space to a valid one.  If NULL_RTX is returned use machine
   independent methods to make the address valid.  */
DEFHOOK
(legitimize_address,
 "",
 rtx, (rtx x, rtx oldx, enum machine_mode mode, addr_space_t as),
 default_addr_space_legitimize_address)

/* True if one named address space is a subset of another named address. */
DEFHOOK
(subset_p,
 "",
 bool, (addr_space_t superset, addr_space_t subset),
 default_addr_space_subset_p)

/* Function to convert an rtl expression from one address space to another.  */
DEFHOOK
(convert,
 "",
 rtx, (rtx op, tree from_type, tree to_type),
 default_addr_space_convert)

HOOK_VECTOR_END (addr_space)

#undef HOOK_PREFIX
#define HOOK_PREFIX "TARGET_"

/* True if MODE is valid for the target.  By "valid", we mean able to
   be manipulated in non-trivial ways.  In particular, this means all
   the arithmetic is supported.  */
DEFHOOK
(scalar_mode_supported_p,
 "",
 bool, (enum machine_mode mode),
 default_scalar_mode_supported_p)

/* Similarly for vector modes.  "Supported" here is less strict.  At
   least some operations are supported; need to check optabs or builtins
   for further details.  */
DEFHOOK
(vector_mode_supported_p,
 "",
 bool, (enum machine_mode mode),
 hook_bool_mode_false)

/* Compute cost of moving data from a register of class FROM to one of
   TO, using MODE.  */
DEFHOOK
(register_move_cost,
 "",
 int, (enum machine_mode mode, reg_class_t from, reg_class_t to),
 default_register_move_cost)

/* Compute cost of moving registers to/from memory.  */
/* ??? Documenting the argument types for this hook requires a GFDL
   license grant.  Also, the documentation uses a different name for RCLASS.  */
DEFHOOK
(memory_move_cost,
 "",
 int, (enum machine_mode mode, reg_class_t rclass, bool in),
 default_memory_move_cost)

/* True for MODE if the target expects that registers in this mode will
   be allocated to registers in a small register class.  The compiler is
   allowed to use registers explicitly used in the rtl as spill registers
   but it should prevent extending the lifetime of these registers.  */
DEFHOOK
(small_register_classes_for_mode_p,
 "",
 bool, (enum machine_mode mode),
 hook_bool_mode_false)

/* Compute a (partial) cost for rtx X.  Return true if the complete
   cost has been computed, and false if subexpressions should be
   scanned.  In either case, *TOTAL contains the cost result.  */
/* Note that CODE and OUTER_CODE ought to be RTX_CODE, but that's
   not necessarily defined at this point.  */
DEFHOOK
(rtx_costs,
 "",
 bool, (rtx x, int code, int outer_code, int *total, bool speed),
 hook_bool_rtx_int_int_intp_bool_false)

/* Compute the cost of X, used as an address.  Never called with
   invalid addresses.  */
DEFHOOK
(address_cost,
 "",
 int, (rtx address, bool speed),
 default_address_cost)

/* Return where to allocate pseudo for a given hard register initial value.  */
DEFHOOK
(allocate_initial_value,
 "",
 rtx, (rtx hard_reg), NULL)

/* Return nonzero if evaluating UNSPEC[_VOLATILE] X might cause a trap.
   FLAGS has the same meaning as in rtlanal.c: may_trap_p_1.  */
DEFHOOK
(unspec_may_trap_p,
 "",
 int, (const_rtx x, unsigned flags),
 default_unspec_may_trap_p)

/* Given a register, this hook should return a parallel of registers
   to represent where to find the register pieces.  Define this hook
   if the register and its mode are represented in Dwarf in
   non-contiguous locations, or if the register should be
   represented in more than one register in Dwarf.  Otherwise, this
   hook should return NULL_RTX.  */
DEFHOOK
(dwarf_register_span,
 "",
 rtx, (rtx reg),
 hook_rtx_rtx_null)

/* If expand_builtin_init_dwarf_reg_sizes needs to fill in table
   entries not corresponding directly to registers below
   FIRST_PSEUDO_REGISTER, this hook should generate the necessary
   code, given the address of the table.  */
DEFHOOK
(init_dwarf_reg_sizes_extra,
 "",
 void, (tree address),
 hook_void_tree)

/* Fetch the fixed register(s) which hold condition codes, for
   targets where it makes sense to look for duplicate assignments to
   the condition codes.  This should return true if there is such a
   register, false otherwise.  The arguments should be set to the
   fixed register numbers.  Up to two condition code registers are
   supported.  If there is only one for this target, the int pointed
   at by the second argument should be set to -1.  */
DEFHOOK
(fixed_condition_code_regs,
 "",
 bool, (unsigned int *p1, unsigned int *p2),
 hook_bool_uintp_uintp_false)

/* If two condition code modes are compatible, return a condition
     code mode which is compatible with both, such that a comparison
     done in the returned mode will work for both of the original
     modes.  If the condition code modes are not compatible, return
     VOIDmode.  */
DEFHOOK
(cc_modes_compatible,
 "",
 enum machine_mode, (enum machine_mode m1, enum machine_mode m2),
 default_cc_modes_compatible)

/* Do machine-dependent code transformations.  Called just before
     delayed-branch scheduling.  */
DEFHOOK
(machine_dependent_reorg,
 "",
 void, (void), NULL)

/* Create the __builtin_va_list type.  */
DEFHOOK
(build_builtin_va_list,
 "",
 tree, (void),
 std_build_builtin_va_list)

/* Enumerate the va list variants.  */
DEFHOOK
(enum_va_list_p,
 "",
 int, (int idx, const char **pname, tree *ptree),
 NULL)

/* Get the cfun/fndecl calling abi __builtin_va_list type.  */
DEFHOOK
(fn_abi_va_list,
 "",
 tree, (tree fndecl),
 std_fn_abi_va_list)

/* Get the __builtin_va_list type dependent on input type.  */
DEFHOOK
(canonical_va_list_type,
 "",
 tree, (tree type),
 std_canonical_va_list_type)

/* ??? Documenting this hook requires a GFDL license grant.  */
DEFHOOK_UNDOC
(expand_builtin_va_start,
"Expand the @code{__builtin_va_start} builtin.",
 void, (tree valist, rtx nextarg), NULL)

/* Gimplifies a VA_ARG_EXPR.  */
DEFHOOK
(gimplify_va_arg_expr,
 "",
 tree, (tree valist, tree type, gimple_seq *pre_p, gimple_seq *post_p),
 std_gimplify_va_arg_expr)

/* Validity-checking routines for PCH files, target-specific.
   get_pch_validity returns a pointer to the data to be stored,
   and stores the size in its argument.  pch_valid_p gets the same
   information back and returns NULL if the PCH is valid,
   or an error message if not.  */
DEFHOOK
(get_pch_validity,
 "",
 void *, (size_t *sz),
 default_get_pch_validity)

DEFHOOK
(pch_valid_p,
 "",
 const char *, (const void *data, size_t sz),
 default_pch_valid_p)

/* If nonnull, this function checks whether a PCH file with the
   given set of target flags can be used.  It returns NULL if so,
   otherwise it returns an error message.  */
DEFHOOK
(check_pch_target_flags,
 "",
 const char *, (int pch_flags), NULL)

/* True if the compiler should give an enum type only as many
   bytes as it takes to represent the range of possible values of
   that type.  */
DEFHOOK
(default_short_enums,
 "",
 bool, (void),
 hook_bool_void_false)

/* This target hook returns an rtx that is used to store the address
   of the current frame into the built-in setjmp buffer.  */
DEFHOOK
(builtin_setjmp_frame_value,
 "",
 rtx, (void),
 default_builtin_setjmp_frame_value)

/* This target hook should add STRING_CST trees for any hard regs
   the port wishes to automatically clobber for an asm.  */
DEFHOOK
(md_asm_clobbers,
 "",
 tree, (tree outputs, tree inputs, tree clobbers),
 hook_tree_tree_tree_tree_3rd_identity)

/* This target hook allows the backend to specify a calling convention
   in the debug information.  This function actually returns an
   enum dwarf_calling_convention, but because of forward declarations
   and not wanting to include dwarf2.h everywhere target.h is included
   the function is being declared as an int.  */
DEFHOOK
(dwarf_calling_convention,
 "",
 int, (const_tree function),
 hook_int_const_tree_0)

/* This target hook allows the backend to emit frame-related insns that
   contain UNSPECs or UNSPEC_VOLATILEs.  The call frame debugging info
   engine will invoke it on insns of the form
     (set (reg) (unspec [...] UNSPEC_INDEX))
   and
     (set (reg) (unspec_volatile [...] UNSPECV_INDEX))
   to let the backend emit the call frame instructions.  */
DEFHOOK
(dwarf_handle_frame_unspec,
 "",
 void, (const char *label, rtx pattern, int index), NULL)

/* ??? Documenting this hook requires a GFDL license grant.  */
DEFHOOK_UNDOC
(stdarg_optimize_hook,
"Perform architecture specific checking of statements gimplified\
 from @code{VA_ARG_EXPR}.  @var{stmt} is the statement.  Returns true if\
 the statement doesn't need to be checked for @code{va_list} references.",
 bool, (struct stdarg_info *ai, const_gimple stmt), NULL)

/* This target hook allows the operating system to override the DECL
   that represents the external variable that contains the stack
   protection guard variable.  The type of this DECL is ptr_type_node.  */
DEFHOOK
(stack_protect_guard,
 "",
 tree, (void),
 default_stack_protect_guard)

/* This target hook allows the operating system to override the CALL_EXPR
   that is invoked when a check vs the guard variable fails.  */
DEFHOOK
(stack_protect_fail,
 "",
 tree, (void),
 default_external_stack_protect_fail)

/* Returns NULL if target supports the insn within a doloop block,
   otherwise it returns an error message.  */
DEFHOOK
(invalid_within_doloop,
 "",
 const char *, (const_rtx insn),
 default_invalid_within_doloop)

DEFHOOK
(valid_dllimport_attribute_p,
"@var{decl} is a variable or function with @code{__attribute__((dllimport))}\
 specified.  Use this hook if the target needs to add extra validation\
 checks to @code{handle_dll_attribute}.",
 bool, (const_tree decl),
 hook_bool_const_tree_true)

/* If non-zero, align constant anchors in CSE to a multiple of this
   value.  */
DEFHOOKPOD
(const_anchor,
 "",
 unsigned HOST_WIDE_INT, 0)

/* Functions relating to calls - argument passing, returns, etc.  */
/* Members of struct call have no special macro prefix.  */
HOOK_VECTOR (TARGET_CALLS, calls)

DEFHOOK
(promote_function_mode,
 "",
 enum machine_mode, (const_tree type, enum machine_mode mode, int *punsignedp,
		     const_tree funtype, int for_return),
 default_promote_function_mode)

DEFHOOK
(promote_prototypes,
 "",
 bool, (const_tree fntype),
 hook_bool_const_tree_false)

DEFHOOK
(struct_value_rtx,
 "",
 rtx, (tree fndecl, int incoming),
 hook_rtx_tree_int_null)
DEFHOOK
(return_in_memory,
 "",
 bool, (const_tree type, const_tree fntype),
 default_return_in_memory)

DEFHOOK
(return_in_msb,
 "",
 bool, (const_tree type),
 hook_bool_const_tree_false)

/* Return true if a parameter must be passed by reference.  TYPE may
   be null if this is a libcall.  CA may be null if this query is
   from __builtin_va_arg.  */
DEFHOOK
(pass_by_reference,
 "",
 bool,
 (CUMULATIVE_ARGS *cum, enum machine_mode mode, const_tree type, bool named),
 hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false)

DEFHOOK
(expand_builtin_saveregs,
 "",
 rtx, (void),
 default_expand_builtin_saveregs)

/* Returns pretend_argument_size.  */
DEFHOOK
(setup_incoming_varargs,
 "",
 void, (CUMULATIVE_ARGS *args_so_far, enum machine_mode mode, tree type,
	int *pretend_args_size, int second_time),
 default_setup_incoming_varargs)

DEFHOOK
(strict_argument_naming,
 "",
 bool, (CUMULATIVE_ARGS *ca),
 hook_bool_CUMULATIVE_ARGS_false)

/* Returns true if we should use
   targetm.calls.setup_incoming_varargs() and/or
   targetm.calls.strict_argument_naming().  */
DEFHOOK
(pretend_outgoing_varargs_named,
 "",
 bool, (CUMULATIVE_ARGS *ca),
 default_pretend_outgoing_varargs_named)

/* Given a complex type T, return true if a parameter of type T
   should be passed as two scalars.  */
DEFHOOK
(split_complex_arg,
 "",
 bool, (const_tree type), NULL)

/* Return true if type T, mode MODE, may not be passed in registers,
   but must be passed on the stack.  */
/* ??? This predicate should be applied strictly after pass-by-reference.
   Need audit to verify that this is the case.  */
DEFHOOK
(must_pass_in_stack,
 "",
 bool, (enum machine_mode mode, const_tree type),
 must_pass_in_stack_var_size_or_pad)

/* Return true if type TYPE, mode MODE, which is passed by reference,
   should have the object copy generated by the callee rather than
   the caller.  It is never called for TYPE requiring constructors.  */
DEFHOOK
(callee_copies,
 "",
 bool,
 (CUMULATIVE_ARGS *cum, enum machine_mode mode, const_tree type, bool named),
 hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false)

/* Return zero for arguments passed entirely on the stack or entirely
   in registers.  If passed in both, return the number of bytes passed
   in registers; the balance is therefore passed on the stack.  */
DEFHOOK
(arg_partial_bytes,
 "",
 int, (CUMULATIVE_ARGS *cum, enum machine_mode mode, tree type, bool named),
 hook_int_CUMULATIVE_ARGS_mode_tree_bool_0)

/* Update the state in CA to advance past an argument in the
   argument list.  The values MODE, TYPE, and NAMED describe that
   argument.  */
/* ??? tm.texi still only describes the old macro.  */
DEFHOOK_UNDOC
(function_arg_advance,
 "",
 void,
 (CUMULATIVE_ARGS *ca, enum machine_mode mode, const_tree type, bool named),
 default_function_arg_advance)

/* Return zero if the argument described by the state of CA should
   be placed on a stack, or a hard register in which to store the
   argument.  The values MODE, TYPE, and NAMED describe that
   argument.  */
/* ??? tm.texi still only describes the old macro.  */
DEFHOOK_UNDOC
(function_arg,
 "",
 rtx, (CUMULATIVE_ARGS *ca, enum machine_mode mode, const_tree type,
       bool named),
 default_function_arg)

/* Likewise, but for machines with register windows.  Return the
   location where the argument will appear to the callee.  */
/* ??? tm.texi still only describes the old macro.  */
DEFHOOK_UNDOC
(function_incoming_arg,
 "",
 rtx, (CUMULATIVE_ARGS *ca, enum machine_mode mode, const_tree type,
       bool named),
 default_function_incoming_arg)

/* Return the diagnostic message string if function without a prototype
   is not allowed for this 'val' argument; NULL otherwise. */
DEFHOOK
(invalid_arg_for_unprototyped_fn,
 "",
 const char *, (const_tree typelist, const_tree funcdecl, const_tree val),
 hook_invalid_arg_for_unprototyped_fn)

/* Return an rtx for the return value location of the function
   specified by FN_DECL_OR_TYPE with a return type of RET_TYPE.  */
DEFHOOK
(function_value,
 "",
 rtx, (const_tree ret_type, const_tree fn_decl_or_type, bool outgoing),
 default_function_value)

/* Return the rtx for the result of a libcall of mode MODE,
   calling the function FN_NAME.  */
DEFHOOK
(libcall_value,
 "",
 rtx, (enum machine_mode mode, const_rtx fun),
 default_libcall_value)

/* Return true if REGNO is a possible register number for
   a function value as seen by the caller.  */
DEFHOOK
(function_value_regno_p,
 "",
 bool, (const unsigned int regno),
 default_function_value_regno_p)

/* ??? Documenting this hook requires a GFDL license grant.  */
DEFHOOK_UNDOC
(internal_arg_pointer,
"Return an rtx for the argument pointer incoming to the\
 current function.",
 rtx, (void),
 default_internal_arg_pointer)

/* Update the current function stack boundary if needed.  */
DEFHOOK
(update_stack_boundary,
 "",
 void, (void), NULL)

/* Handle stack alignment and return an rtx for Dynamic Realign
   Argument Pointer if necessary.  */
DEFHOOK
(get_drap_rtx,
 "",
 rtx, (void), NULL)

/* Return true if all function parameters should be spilled to the
   stack.  */
DEFHOOK
(allocate_stack_slots_for_args,
 "",
 bool, (void),
 hook_bool_void_true)

/* Return an rtx for the static chain for FNDECL.  If INCOMING_P is true,
       then it should be for the callee; otherwise for the caller.  */
DEFHOOK
(static_chain,
 "",
 rtx, (const_tree fndecl, bool incoming_p),
 default_static_chain)

/* Fill in the trampoline at MEM with a call to FNDECL and a
   static chain value of CHAIN.  */
DEFHOOK
(trampoline_init,
 "",
 void, (rtx m_tramp, tree fndecl, rtx static_chain),
 default_trampoline_init)

/* Adjust the address of the trampoline in a target-specific way.  */
DEFHOOK
(trampoline_adjust_address,
 "",
 rtx, (rtx addr), NULL)

/* Return the number of bytes of its own arguments that a function
   pops on returning, or 0 if the function pops no arguments and the
   caller must therefore pop them all after the function returns.  */
/* ??? tm.texi has no types for the parameters.  */
DEFHOOK
(return_pops_args,
 "",
 int, (tree fundecl, tree funtype, int size),
 default_return_pops_args)

HOOK_VECTOR_END (calls)

/* Return the diagnostic message string if conversion from FROMTYPE
   to TOTYPE is not allowed, NULL otherwise.  */
DEFHOOK
(invalid_conversion,
 "",
 const char *, (const_tree fromtype, const_tree totype),
 hook_constcharptr_const_tree_const_tree_null)

/* Return the diagnostic message string if the unary operation OP is
   not permitted on TYPE, NULL otherwise.  */
DEFHOOK
(invalid_unary_op,
 "",
 const char *, (int op, const_tree type),
 hook_constcharptr_int_const_tree_null)

/* Return the diagnostic message string if the binary operation OP
   is not permitted on TYPE1 and TYPE2, NULL otherwise.  */
DEFHOOK
(invalid_binary_op,
 "",
 const char *, (int op, const_tree type1, const_tree type2),
 hook_constcharptr_int_const_tree_const_tree_null)

/* Return the diagnostic message string if TYPE is not valid as a
   function parameter type, NULL otherwise.  */
DEFHOOK
(invalid_parameter_type,
 "",
 const char *, (const_tree type),
 hook_constcharptr_const_tree_null)

/* Return the diagnostic message string if TYPE is not valid as a
   function return type, NULL otherwise.  */
DEFHOOK
(invalid_return_type,
 "",
 const char *, (const_tree type),
 hook_constcharptr_const_tree_null)

/* If values of TYPE are promoted to some other type when used in
   expressions (analogous to the integer promotions), return that type,
   or NULL_TREE otherwise.  */
DEFHOOK
(promoted_type,
 "",
 tree, (const_tree type),
 hook_tree_const_tree_null)

/* Convert EXPR to TYPE, if target-specific types with special conversion
   rules are involved.  Return the converted expression, or NULL to apply
   the standard conversion rules.  */
DEFHOOK
(convert_to_type,
 "",
 tree, (tree type, tree expr),
 hook_tree_tree_tree_null)

/* Return the array of IRA cover classes for the current target.  */
DEFHOOK
(ira_cover_classes,
 "",
 const reg_class_t *, (void),
 default_ira_cover_classes)

/* Return the class for a secondary reload, and fill in extra information.  */
DEFHOOK
(secondary_reload,
 "",
 reg_class_t,
 (bool in_p, rtx x, reg_class_t reload_class, enum machine_mode reload_mode,
  secondary_reload_info *sri),
 default_secondary_reload)

DEFHOOK
(class_likely_spilled_p,
 "",
 bool, (reg_class_t rclass),
 default_class_likely_spilled_p)

/* This target hook allows the backend to perform additional
   processing while initializing for variable expansion.  */
DEFHOOK
(expand_to_rtl_hook,
 "",
 void, (void),
 hook_void_void)

/* This target hook allows the backend to perform additional
   instantiations on rtx that are not actually in insns yet,
   but will be later.  */
DEFHOOK
(instantiate_decls,
 "",
 void, (void),
 hook_void_void)

/* Return true if is OK to use a hard register REGNO as scratch register
   in peephole2.  */
DEFHOOK
(hard_regno_scratch_ok,
 "",
 bool, (unsigned int regno),
 default_hard_regno_scratch_ok)

/* Return the smallest number of different values for which it is best to
   use a jump-table instead of a tree of conditional branches.  */
DEFHOOK
(case_values_threshold,
 "",
 unsigned int, (void),
 default_case_values_threshold)

/* Retutn true if a function must have and use a frame pointer.  */
DEFHOOK
(frame_pointer_required,
 "",
 bool, (void),
 hook_bool_void_false)

/* Returns true if the compiler is allowed to try to replace register number
   from-reg with register number to-reg.  */
DEFHOOK
(can_eliminate,
 "",
 bool, (const int from_reg, const int to_reg),
 hook_bool_const_int_const_int_true)

/* Functions specific to the C family of frontends.  */
#undef HOOK_PREFIX
#define HOOK_PREFIX "TARGET_C_"
HOOK_VECTOR (TARGET_C, c)

/* ??? Documenting this hook requires a GFDL license grant.  */
DEFHOOK_UNDOC
(mode_for_suffix,
"Return machine mode for non-standard constant literal suffix @var{c},\
 or VOIDmode if non-standard suffixes are unsupported.",
 enum machine_mode, (char c),
 default_mode_for_suffix)

HOOK_VECTOR_END (c)

/* Functions specific to the C++ frontend.  */
#undef HOOK_PREFIX
#define HOOK_PREFIX "TARGET_CXX_"
HOOK_VECTOR (TARGET_CXX, cxx)

/* Return the integer type used for guard variables.  */
DEFHOOK
(guard_type,
 "",
 tree, (void),
 default_cxx_guard_type)

/* Return true if only the low bit of the guard should be tested.  */
DEFHOOK
(guard_mask_bit,
 "",
 bool, (void),
 hook_bool_void_false)

/* Returns the size of the array cookie for an array of type.  */
DEFHOOK
(get_cookie_size,
 "",
 tree, (tree type),
 default_cxx_get_cookie_size)

/* Returns true if the element size should be stored in the array cookie.  */
DEFHOOK
(cookie_has_size,
 "",
 bool, (void),
 hook_bool_void_false)

/* Allows backends to perform additional processing when
   deciding if a class should be exported or imported.  */
DEFHOOK
(import_export_class,
 "",
 int, (tree type, int import_export), NULL)

/* Returns true if constructors and destructors return "this".  */
DEFHOOK
(cdtor_returns_this,
 "",
 bool, (void),
 hook_bool_void_false)

/* Returns true if the key method for a class can be an inline
   function, so long as it is not declared inline in the class
   itself.  Returning true is the behavior required by the Itanium C++ ABI.  */
DEFHOOK
(key_method_may_be_inline,
 "",
 bool, (void),
 hook_bool_void_true)

DEFHOOK
(determine_class_data_visibility,
"@var{decl} is a virtual table, virtual table table, typeinfo object,\
 or other similar implicit class data object that will be emitted with\
 external linkage in this translation unit.  No ELF visibility has been\
 explicitly specified.  If the target needs to specify a visibility\
 other than that of the containing class, use this hook to set\
 @code{DECL_VISIBILITY} and @code{DECL_VISIBILITY_SPECIFIED}.",
 void, (tree decl),
 hook_void_tree)

/* Returns true (the default) if virtual tables and other
   similar implicit class data objects are always COMDAT if they
   have external linkage.  If this hook returns false, then
   class data for classes whose virtual table will be emitted in
   only one translation unit will not be COMDAT.  */
DEFHOOK
(class_data_always_comdat,
 "",
 bool, (void),
 hook_bool_void_true)

/* Returns true (the default) if the RTTI for the basic types,
   which is always defined in the C++ runtime, should be COMDAT;
   false if it should not be COMDAT.  */
DEFHOOK
(library_rtti_comdat,
 "",
 bool, (void),
 hook_bool_void_true)

/* Returns true if __aeabi_atexit should be used to register static
   destructors.  */
DEFHOOK
(use_aeabi_atexit,
 "",
 bool, (void),
 hook_bool_void_false)

/* Returns true if target may use atexit in the same manner as
   __cxa_atexit  to register static destructors.  */
DEFHOOK
(use_atexit_for_cxa_atexit,
 "",
 bool, (void),
 hook_bool_void_false)

DEFHOOK
(adjust_class_at_definition,
"@var{type} is a C++ class (i.e., RECORD_TYPE or UNION_TYPE) that has just\
 been defined.  Use this hook to make adjustments to the class (eg, tweak\
 visibility or perform any other required target modifications).",
 void, (tree type),
 hook_void_tree)

HOOK_VECTOR_END (cxx)

/* Functions and data for emulated TLS support.  */
#undef HOOK_PREFIX
#define HOOK_PREFIX "TARGET_EMUTLS_"
HOOK_VECTOR (TARGET_EMUTLS, emutls)

/* Name of the address and common functions.  */
DEFHOOKPOD
(get_address,
 "",
 const char *, "__builtin___emutls_get_address")

DEFHOOKPOD
(register_common,
 "",
 const char *, "__builtin___emutls_register_common")

/* Prefixes for proxy variable and template.  */
DEFHOOKPOD
(var_section,
 "",
 const char *, NULL)

DEFHOOKPOD
(tmpl_section,
 "",
 const char *, NULL)

/* Prefixes for proxy variable and template.  */
DEFHOOKPOD
(var_prefix,
 "",
 const char *, NULL)

DEFHOOKPOD
(tmpl_prefix,
 "",
 const char *, NULL)

/* Function to generate field definitions of the proxy variable.  */
DEFHOOK
(var_fields,
 "",
 tree, (tree type, tree *name),
 default_emutls_var_fields)

/* Function to initialize a proxy variable.  */
DEFHOOK
(var_init,
 "",
 tree, (tree var, tree decl, tree tmpl_addr),
 default_emutls_var_init)

/* Whether we are allowed to alter the usual alignment of the
   proxy variable.  */
DEFHOOKPOD
(var_align_fixed,
 "",
 bool, false)

/* Whether we can emit debug information for TLS vars.  */
DEFHOOKPOD
(debug_form_tls_address,
 "",
 bool, false)

HOOK_VECTOR_END (emutls)

#undef HOOK_PREFIX
#define HOOK_PREFIX "TARGET_OPTION_"
HOOK_VECTOR (TARGET_OPTION_HOOKS, target_option_hooks)

/* Function to validate the attribute((option(...))) strings or NULL.  If
   the option is validated, it is assumed that DECL_FUNCTION_SPECIFIC will
   be filled in in the function decl node.  */
DEFHOOK
(valid_attribute_p,
 "",
 bool, (tree fndecl, tree name, tree args, int flags),
 default_target_option_valid_attribute_p)

/* Function to save any extra target state in the target options structure.  */
DEFHOOK
(save,
 "",
 void, (struct cl_target_option *ptr), NULL)

/* Function to restore any extra target state from the target options
   structure.  */
DEFHOOK
(restore,
 "",
 void, (struct cl_target_option *ptr), NULL)

/* Function to print any extra target state from the target options
   structure.  */
DEFHOOK
(print,
 "",
 void, (FILE *file, int indent, struct cl_target_option *ptr), NULL)

/* Function to parse arguments to be validated for #pragma option, and to
   change the state if the options are valid.  If the first argument is
   NULL, the second argument specifies the default options to use.  Return
   true if the options are valid, and set the current state.  */
/* ??? The documentation in tm.texi is incomplete.  */
DEFHOOK
(pragma_parse,
 "",
 bool, (tree args, tree pop_target),
 default_target_option_pragma_parse)

/* Do option overrides for the target.  */
DEFHOOK
(override,
 "",
 void, (void),
 hook_void_void)

/* Set default optimizations for the target.  */
DEFHOOK
(optimization,
 "",
 void, (int level, int size),
 hook_void_int_int)

/* Function to determine if one function can inline another function.  */
#undef HOOK_PREFIX
#define HOOK_PREFIX "TARGET_"
DEFHOOK
(can_inline_p,
 "",
 bool, (tree caller, tree callee),
 default_target_can_inline_p)

HOOK_VECTOR_END (target_option)

/* For targets that need to mark extra registers as live on entry to
   the function, they should define this target hook and set their
   bits in the bitmap passed in. */
DEFHOOK
(extra_live_on_entry,
 "",
 void, (bitmap regs),
 hook_void_bitmap)

/* Leave the boolean fields at the end.  */

/* True if unwinding tables should be generated by default.  */
DEFHOOKPOD
(unwind_tables_default,
 "",
 bool, false)

/* True if arbitrary sections are supported.  */
DEFHOOKPOD
(have_named_sections,
 "",
 bool, false)

/* True if we can create zeroed data by switching to a BSS section
   and then using ASM_OUTPUT_SKIP to allocate the space.  */
DEFHOOKPOD
(have_switchable_bss_sections,
 "",
 bool, false)

/* True if "native" constructors and destructors are supported,
   false if we're using collect2 for the job.  */
DEFHOOKPOD
(have_ctors_dtors,
 "",
 bool, false)

/* True if thread-local storage is supported.  */
DEFHOOKPOD
(have_tls,
 "",
 bool, false)

/* True if a small readonly data section is supported.  */
DEFHOOKPOD
(have_srodata_section,
 "",
 bool, false)

/* True if EH frame info sections should be zero-terminated.  */
DEFHOOKPOD
(terminate_dw2_eh_frame_info,
 "",
 bool, true)

/* True if #NO_APP should be emitted at the beginning of assembly output.  */
DEFHOOKPOD
(asm_file_start_app_off,
 "",
 bool, false)

/* True if output_file_directive should be called for main_input_filename
   at the beginning of assembly output.  */
DEFHOOKPOD
(asm_file_start_file_directive,
 "",
 bool, false)

DEFHOOKPOD
(handle_pragma_extern_prefix,
"True if @code{#pragma extern_prefix} is to be supported.",
 bool, 0)

/* True if the target is allowed to reorder memory accesses unless
   synchronization is explicitly requested.  */
DEFHOOKPOD
(relaxed_ordering,
 "",
 bool, false)

/* Returns true if we should generate exception tables for use with the
   ARM EABI.  The effects the encoding of function exception specifications.  */
DEFHOOKPOD
(arm_eabi_unwinder,
 "",
 bool, false)

DEFHOOKPOD
(want_debug_pub_sections,
 "True if the @code{.debug_pubtypes} and @code{.debug_pubnames} sections\
 should be emitted.  These sections are not used on most platforms, and\
 in particular GDB does not use them.",
 bool, false)

/* Leave the boolean fields at the end.  */

/* Empty macro arguments are undefined in C90, so use an empty macro.  */
#define C90_EMPTY_HACK
/* Close the 'struct gcc_target' definition.  */
HOOK_VECTOR_END (C90_EMPTY_HACK)

HOOK_VECTOR (TARGETCM_INITIALIZER, gcc_targetcm)

/* Handle target switch CODE (an OPT_* value).  ARG is the argument
   passed to the switch; it is NULL if no argument was.  VALUE is the
   value of ARG if CODE specifies a UInteger option, otherwise it is
   1 if the positive form of the switch was used and 0 if the negative
   form was.  Return true if the switch was valid.  */
DEFHOOK
(handle_c_option,
 "",
 bool, (size_t code, const char *arg, int value),
 default_handle_c_option)

HOOK_VECTOR_END (C90_EMPTY_HACK)