comparison gcc/doc/sourcebuild.texi @ 132:d34655255c78

update gcc-8.2
author mir3636
date Thu, 25 Oct 2018 10:21:07 +0900
parents 84e7813d76e9
children 1830386684a0
comparison
equal deleted inserted replaced
130:e108057fa461 132:d34655255c78
1 @c Copyright (C) 2002-2017 Free Software Foundation, Inc. 1 @c Copyright (C) 2002-2018 Free Software Foundation, Inc.
2 @c This is part of the GCC manual. 2 @c This is part of the GCC manual.
3 @c For copying conditions, see the file gcc.texi. 3 @c For copying conditions, see the file gcc.texi.
4 4
5 @node Source Tree 5 @node Source Tree
6 @chapter Source Tree Structure and Build System 6 @chapter Source Tree Structure and Build System
820 libraries. FIXME: reference docs for this. The @code{libstdc++} porting 820 libraries. FIXME: reference docs for this. The @code{libstdc++} porting
821 manual needs to be installed as info for this to work, or to be a 821 manual needs to be installed as info for this to work, or to be a
822 chapter of this manual. 822 chapter of this manual.
823 @end itemize 823 @end itemize
824 824
825 The @file{@var{machine}.h} header is included very early in GCC's
826 standard sequence of header files, while @file{@var{machine}-protos.h}
827 is included late in the sequence. Thus @file{@var{machine}-protos.h}
828 can include declarations referencing types that are not defined when
829 @file{@var{machine}.h} is included, specifically including those from
830 @file{rtl.h} and @file{tree.h}. Since both RTL and tree types may not
831 be available in every context where @file{@var{machine}-protos.h} is
832 included, in this file you should guard declarations using these types
833 inside appropriate @code{#ifdef RTX_CODE} or @code{#ifdef TREE_CODE}
834 conditional code segments.
835
836 If the backend uses shared data structures that require @code{GTY} markers
837 for garbage collection (@pxref{Type Information}), you must declare those
838 in @file{@var{machine}.h} rather than @file{@var{machine}-protos.h}.
839 Any definitions required for building libgcc must also go in
840 @file{@var{machine}.h}.
841
842 GCC uses the macro @code{IN_TARGET_CODE} to distinguish between
843 machine-specific @file{.c} and @file{.cc} files and
844 machine-independent @file{.c} and @file{.cc} files. Machine-specific
845 files should use the directive:
846
847 @example
848 #define IN_TARGET_CODE 1
849 @end example
850
851 before including @code{config.h}.
852
825 If the back end is added to the official GCC source repository, the 853 If the back end is added to the official GCC source repository, the
826 following are also necessary: 854 following are also necessary:
827 855
828 @itemize @bullet 856 @itemize @bullet
829 @item 857 @item
1147 Expect the test executable to return a nonzero exit status if the 1175 Expect the test executable to return a nonzero exit status if the
1148 conditions (which are the same as for @code{dg-skip-if}) are met. 1176 conditions (which are the same as for @code{dg-skip-if}) are met.
1149 @end table 1177 @end table
1150 1178
1151 @subsubsection Verify compiler messages 1179 @subsubsection Verify compiler messages
1180 Where @var{line} is an accepted argument for these commands, a value of @samp{0}
1181 can be used if there is no line associated with the message.
1152 1182
1153 @table @code 1183 @table @code
1154 @item @{ dg-error @var{regexp} [@var{comment} [@{ target/xfail @var{selector} @} [@var{line}] ]] @} 1184 @item @{ dg-error @var{regexp} [@var{comment} [@{ target/xfail @var{selector} @} [@var{line}] ]] @}
1155 This DejaGnu directive appears on a source line that is expected to get 1185 This DejaGnu directive appears on a source line that is expected to get
1156 an error message, or else specifies the source line associated with the 1186 an error message, or else specifies the source line associated with the
1283 with which the test will be compiled, including the multilib options. 1313 with which the test will be compiled, including the multilib options.
1284 By convention, keywords ending in @code{_nocache} can also include options 1314 By convention, keywords ending in @code{_nocache} can also include options
1285 specified for the particular test in an earlier @code{dg-options} or 1315 specified for the particular test in an earlier @code{dg-options} or
1286 @code{dg-add-options} directive. 1316 @code{dg-add-options} directive.
1287 1317
1318 @subsubsection Endianness
1319
1320 @table @code
1321 @item be
1322 Target uses big-endian memory order for multi-byte and multi-word data.
1323
1324 @item le
1325 Target uses little-endian memory order for multi-byte and multi-word data.
1326 @end table
1327
1288 @subsubsection Data type sizes 1328 @subsubsection Data type sizes
1289 1329
1290 @table @code 1330 @table @code
1291 @item ilp32 1331 @item ilp32
1292 Target has 32-bit @code{int}, @code{long}, and pointers. 1332 Target has 32-bit @code{int}, @code{long}, and pointers.
1371 @end table 1411 @end table
1372 1412
1373 @subsubsection Vector-specific attributes 1413 @subsubsection Vector-specific attributes
1374 1414
1375 @table @code 1415 @table @code
1416 @item vect_align_stack_vars
1417 The target's ABI allows stack variables to be aligned to the preferred
1418 vector alignment.
1419
1420 @item vect_avg_qi
1421 Target supports both signed and unsigned averaging operations on vectors
1422 of bytes.
1423
1376 @item vect_condition 1424 @item vect_condition
1377 Target supports vector conditional operations. 1425 Target supports vector conditional operations.
1378 1426
1379 @item vect_cond_mixed 1427 @item vect_cond_mixed
1380 Target supports vector conditional operations where comparison operands 1428 Target supports vector conditional operations where comparison operands
1381 have different type from the value operands. 1429 have different type from the value operands.
1382 1430
1383 @item vect_double 1431 @item vect_double
1384 Target supports hardware vectors of @code{double}. 1432 Target supports hardware vectors of @code{double}.
1385 1433
1434 @item vect_double_cond_arith
1435 Target supports conditional addition, subtraction, multiplication,
1436 division, minimum and maximum on vectors of @code{double}, via the
1437 @code{cond_} optabs.
1438
1439 @item vect_element_align_preferred
1440 The target's preferred vector alignment is the same as the element
1441 alignment.
1442
1386 @item vect_float 1443 @item vect_float
1387 Target supports hardware vectors of @code{float}. 1444 Target supports hardware vectors of @code{float} when
1445 @option{-funsafe-math-optimizations} is in effect.
1446
1447 @item vect_float_strict
1448 Target supports hardware vectors of @code{float} when
1449 @option{-funsafe-math-optimizations} is not in effect.
1450 This implies @code{vect_float}.
1388 1451
1389 @item vect_int 1452 @item vect_int
1390 Target supports hardware vectors of @code{int}. 1453 Target supports hardware vectors of @code{int}.
1391 1454
1392 @item vect_long 1455 @item vect_long
1393 Target supports hardware vectors of @code{long}. 1456 Target supports hardware vectors of @code{long}.
1394 1457
1395 @item vect_long_long 1458 @item vect_long_long
1396 Target supports hardware vectors of @code{long long}. 1459 Target supports hardware vectors of @code{long long}.
1460
1461 @item vect_fully_masked
1462 Target supports fully-masked (also known as fully-predicated) loops,
1463 so that vector loops can handle partial as well as full vectors.
1464
1465 @item vect_masked_store
1466 Target supports vector masked stores.
1467
1468 @item vect_scatter_store
1469 Target supports vector scatter stores.
1397 1470
1398 @item vect_aligned_arrays 1471 @item vect_aligned_arrays
1399 Target aligns arrays to vector alignment boundary. 1472 Target aligns arrays to vector alignment boundary.
1400 1473
1401 @item vect_hw_misalign 1474 @item vect_hw_misalign
1446 element types. 1519 element types.
1447 1520
1448 @item vect_perm 1521 @item vect_perm
1449 Target supports vector permutation. 1522 Target supports vector permutation.
1450 1523
1524 @item vect_perm_byte
1525 Target supports permutation of vectors with 8-bit elements.
1526
1527 @item vect_perm_short
1528 Target supports permutation of vectors with 16-bit elements.
1529
1530 @item vect_perm3_byte
1531 Target supports permutation of vectors with 8-bit elements, and for the
1532 default vector length it is possible to permute:
1533 @example
1534 @{ a0, a1, a2, b0, b1, b2, @dots{} @}
1535 @end example
1536 to:
1537 @example
1538 @{ a0, a0, a0, b0, b0, b0, @dots{} @}
1539 @{ a1, a1, a1, b1, b1, b1, @dots{} @}
1540 @{ a2, a2, a2, b2, b2, b2, @dots{} @}
1541 @end example
1542 using only two-vector permutes, regardless of how long the sequence is.
1543
1544 @item vect_perm3_int
1545 Like @code{vect_perm3_byte}, but for 32-bit elements.
1546
1547 @item vect_perm3_short
1548 Like @code{vect_perm3_byte}, but for 16-bit elements.
1549
1451 @item vect_shift 1550 @item vect_shift
1452 Target supports a hardware vector shift operation. 1551 Target supports a hardware vector shift operation.
1552
1553 @item vect_unaligned_possible
1554 Target prefers vectors to have an alignment greater than element
1555 alignment, but also allows unaligned vector accesses in some
1556 circumstances.
1557
1558 @item vect_variable_length
1559 Target has variable-length vectors.
1453 1560
1454 @item vect_widen_sum_hi_to_si 1561 @item vect_widen_sum_hi_to_si
1455 Target supports a vector widening summation of @code{short} operands 1562 Target supports a vector widening summation of @code{short} operands
1456 into @code{int} results, or can promote (unpack) from @code{short} 1563 into @code{int} results, or can promote (unpack) from @code{short}
1457 to @code{int}. 1564 to @code{int}.
1523 @item vect_sizes_16B_8B 1630 @item vect_sizes_16B_8B
1524 Target supports 16- and 8-bytes vectors. 1631 Target supports 16- and 8-bytes vectors.
1525 1632
1526 @item vect_sizes_32B_16B 1633 @item vect_sizes_32B_16B
1527 Target supports 32- and 16-bytes vectors. 1634 Target supports 32- and 16-bytes vectors.
1635
1636 @item vect_logical_reduc
1637 Target supports AND, IOR and XOR reduction on vectors.
1638
1639 @item vect_fold_extract_last
1640 Target supports the @code{fold_extract_last} optab.
1528 @end table 1641 @end table
1529 1642
1530 @subsubsection Thread Local Storage attributes 1643 @subsubsection Thread Local Storage attributes
1531 1644
1532 @table @code 1645 @table @code
1579 @item arm_hf_eabi 1692 @item arm_hf_eabi
1580 ARM target adheres to the VFP and Advanced SIMD Register Arguments 1693 ARM target adheres to the VFP and Advanced SIMD Register Arguments
1581 variant of the ABI for the ARM Architecture (as selected with 1694 variant of the ABI for the ARM Architecture (as selected with
1582 @code{-mfloat-abi=hard}). 1695 @code{-mfloat-abi=hard}).
1583 1696
1697 @item arm_softfloat
1698 ARM target uses the soft-float ABI with no floating-point instructions
1699 used whatsoever (as selected with @code{-mfloat-abi=soft}).
1700
1584 @item arm_hard_vfp_ok 1701 @item arm_hard_vfp_ok
1585 ARM target supports @code{-mfpu=vfp -mfloat-abi=hard}. 1702 ARM target supports @code{-mfpu=vfp -mfloat-abi=hard}.
1586 Some multilibs may be incompatible with these options. 1703 Some multilibs may be incompatible with these options.
1587 1704
1588 @item arm_iwmmxt_ok 1705 @item arm_iwmmxt_ok
1667 ARM target supports @code{-mfpu=neon-fp-armv8 -mfloat-abi=softfp}. 1784 ARM target supports @code{-mfpu=neon-fp-armv8 -mfloat-abi=softfp}.
1668 Some multilibs may be incompatible with these options. 1785 Some multilibs may be incompatible with these options.
1669 1786
1670 @item arm_v8_1a_neon_ok 1787 @item arm_v8_1a_neon_ok
1671 @anchor{arm_v8_1a_neon_ok} 1788 @anchor{arm_v8_1a_neon_ok}
1672 ARM target supports options to generate ARMv8.1 Adv.SIMD instructions. 1789 ARM target supports options to generate ARMv8.1-A Adv.SIMD instructions.
1673 Some multilibs may be incompatible with these options. 1790 Some multilibs may be incompatible with these options.
1674 1791
1675 @item arm_v8_1a_neon_hw 1792 @item arm_v8_1a_neon_hw
1676 ARM target supports executing ARMv8.1 Adv.SIMD instructions. Some 1793 ARM target supports executing ARMv8.1-A Adv.SIMD instructions. Some
1677 multilibs may be incompatible with the options needed. Implies 1794 multilibs may be incompatible with the options needed. Implies
1678 arm_v8_1a_neon_ok. 1795 arm_v8_1a_neon_ok.
1679 1796
1680 @item arm_acq_rel 1797 @item arm_acq_rel
1681 ARM target supports acquire-release instructions. 1798 ARM target supports acquire-release instructions.
1682 1799
1683 @item arm_v8_2a_fp16_scalar_ok 1800 @item arm_v8_2a_fp16_scalar_ok
1684 @anchor{arm_v8_2a_fp16_scalar_ok} 1801 @anchor{arm_v8_2a_fp16_scalar_ok}
1685 ARM target supports options to generate instructions for ARMv8.2 and 1802 ARM target supports options to generate instructions for ARMv8.2-A and
1686 scalar instructions from the FP16 extension. Some multilibs may be 1803 scalar instructions from the FP16 extension. Some multilibs may be
1687 incompatible with these options. 1804 incompatible with these options.
1688 1805
1689 @item arm_v8_2a_fp16_scalar_hw 1806 @item arm_v8_2a_fp16_scalar_hw
1690 ARM target supports executing instructions for ARMv8.2 and scalar 1807 ARM target supports executing instructions for ARMv8.2-A and scalar
1691 instructions from the FP16 extension. Some multilibs may be 1808 instructions from the FP16 extension. Some multilibs may be
1692 incompatible with these options. Implies arm_v8_2a_fp16_neon_ok. 1809 incompatible with these options. Implies arm_v8_2a_fp16_neon_ok.
1693 1810
1694 @item arm_v8_2a_fp16_neon_ok 1811 @item arm_v8_2a_fp16_neon_ok
1695 @anchor{arm_v8_2a_fp16_neon_ok} 1812 @anchor{arm_v8_2a_fp16_neon_ok}
1696 ARM target supports options to generate instructions from ARMv8.2 with 1813 ARM target supports options to generate instructions from ARMv8.2-A with
1697 the FP16 extension. Some multilibs may be incompatible with these 1814 the FP16 extension. Some multilibs may be incompatible with these
1698 options. Implies arm_v8_2a_fp16_scalar_ok. 1815 options. Implies arm_v8_2a_fp16_scalar_ok.
1699 1816
1700 @item arm_v8_2a_fp16_neon_hw 1817 @item arm_v8_2a_fp16_neon_hw
1701 ARM target supports executing instructions from ARMv8.2 with the FP16 1818 ARM target supports executing instructions from ARMv8.2-A with the FP16
1702 extension. Some multilibs may be incompatible with these options. 1819 extension. Some multilibs may be incompatible with these options.
1703 Implies arm_v8_2a_fp16_neon_ok and arm_v8_2a_fp16_scalar_hw. 1820 Implies arm_v8_2a_fp16_neon_ok and arm_v8_2a_fp16_scalar_hw.
1704 1821
1705 @item arm_v8_2a_dotprod_neon_ok 1822 @item arm_v8_2a_dotprod_neon_ok
1706 @anchor{arm_v8_2a_dotprod_neon_ok} 1823 @anchor{arm_v8_2a_dotprod_neon_ok}
1707 ARM target supports options to generate instructions from ARMv8.2 with 1824 ARM target supports options to generate instructions from ARMv8.2-A with
1708 the Dot Product extension. Some multilibs may be incompatible with these 1825 the Dot Product extension. Some multilibs may be incompatible with these
1709 options. 1826 options.
1710 1827
1711 @item arm_v8_2a_dotprod_neon_hw 1828 @item arm_v8_2a_dotprod_neon_hw
1712 ARM target supports executing instructions from ARMv8.2 with the Dot 1829 ARM target supports executing instructions from ARMv8.2-A with the Dot
1713 Product extension. Some multilibs may be incompatible with these options. 1830 Product extension. Some multilibs may be incompatible with these options.
1714 Implies arm_v8_2a_dotprod_neon_ok. 1831 Implies arm_v8_2a_dotprod_neon_ok.
1832
1833 @item arm_fp16fml_neon_ok
1834 @anchor{arm_fp16fml_neon_ok}
1835 ARM target supports extensions to generate the @code{VFMAL} and @code{VFMLS}
1836 half-precision floating-point instructions available from ARMv8.2-A and
1837 onwards. Some multilibs may be incompatible with these options.
1715 1838
1716 @item arm_prefer_ldrd_strd 1839 @item arm_prefer_ldrd_strd
1717 ARM target prefers @code{LDRD} and @code{STRD} instructions over 1840 ARM target prefers @code{LDRD} and @code{STRD} instructions over
1718 @code{LDM} and @code{STM} instructions. 1841 @code{LDM} and @code{STM} instructions.
1719 1842
2069 2192
2070 @table @code 2193 @table @code
2071 @item automatic_stack_alignment 2194 @item automatic_stack_alignment
2072 Target supports automatic stack alignment. 2195 Target supports automatic stack alignment.
2073 2196
2074 @item cilkplus_runtime 2197 @item branch_cost
2075 Target supports the Cilk Plus runtime library. 2198 Target supports @option{-branch-cost=N}.
2076 2199
2077 @item cxa_atexit 2200 @item cxa_atexit
2078 Target uses @code{__cxa_atexit}. 2201 Target uses @code{__cxa_atexit}.
2079 2202
2080 @item default_packed 2203 @item default_packed
2146 @item pie 2269 @item pie
2147 Target supports @option{-pie}, @option{-fpie} and @option{-fPIE}. 2270 Target supports @option{-pie}, @option{-fpie} and @option{-fPIE}.
2148 2271
2149 @item rdynamic 2272 @item rdynamic
2150 Target supports @option{-rdynamic}. 2273 Target supports @option{-rdynamic}.
2274
2275 @item scalar_all_fma
2276 Target supports all four fused multiply-add optabs for both @code{float}
2277 and @code{double}. These optabs are: @code{fma_optab}, @code{fms_optab},
2278 @code{fnma_optab} and @code{fnms_optab}.
2151 2279
2152 @item section_anchors 2280 @item section_anchors
2153 Target supports section anchors. 2281 Target supports section anchors.
2154 2282
2155 @item short_enums 2283 @item short_enums
2301 @item arm_vfp3 2429 @item arm_vfp3
2302 arm vfp3 floating point support; see 2430 arm vfp3 floating point support; see
2303 the @ref{arm_vfp3_ok,,arm_vfp3_ok effective target keyword}. 2431 the @ref{arm_vfp3_ok,,arm_vfp3_ok effective target keyword}.
2304 2432
2305 @item arm_v8_1a_neon 2433 @item arm_v8_1a_neon
2306 Add options for ARMv8.1 with Adv.SIMD support, if this is supported 2434 Add options for ARMv8.1-A with Adv.SIMD support, if this is supported
2307 by the target; see the @ref{arm_v8_1a_neon_ok,,arm_v8_1a_neon_ok} 2435 by the target; see the @ref{arm_v8_1a_neon_ok,,arm_v8_1a_neon_ok}
2308 effective target keyword. 2436 effective target keyword.
2309 2437
2310 @item arm_v8_2a_fp16_scalar 2438 @item arm_v8_2a_fp16_scalar
2311 Add options for ARMv8.2 with scalar FP16 support, if this is 2439 Add options for ARMv8.2-A with scalar FP16 support, if this is
2312 supported by the target; see the 2440 supported by the target; see the
2313 @ref{arm_v8_2a_fp16_scalar_ok,,arm_v8_2a_fp16_scalar_ok} effective 2441 @ref{arm_v8_2a_fp16_scalar_ok,,arm_v8_2a_fp16_scalar_ok} effective
2314 target keyword. 2442 target keyword.
2315 2443
2316 @item arm_v8_2a_fp16_neon 2444 @item arm_v8_2a_fp16_neon
2317 Add options for ARMv8.2 with Adv.SIMD FP16 support, if this is 2445 Add options for ARMv8.2-A with Adv.SIMD FP16 support, if this is
2318 supported by the target; see the 2446 supported by the target; see the
2319 @ref{arm_v8_2a_fp16_neon_ok,,arm_v8_2a_fp16_neon_ok} effective target 2447 @ref{arm_v8_2a_fp16_neon_ok,,arm_v8_2a_fp16_neon_ok} effective target
2320 keyword. 2448 keyword.
2321 2449
2322 @item arm_v8_2a_dotprod_neon 2450 @item arm_v8_2a_dotprod_neon
2323 Add options for ARMv8.2 with Adv.SIMD Dot Product support, if this is 2451 Add options for ARMv8.2-A with Adv.SIMD Dot Product support, if this is
2324 supported by the target; see the 2452 supported by the target; see the
2325 @ref{arm_v8_2a_dotprod_neon_ok} effective target keyword. 2453 @ref{arm_v8_2a_dotprod_neon_ok} effective target keyword.
2454
2455 @item arm_fp16fml_neon
2456 Add options to enable generation of the @code{VFMAL} and @code{VFMSL}
2457 instructions, if this is supported by the target; see the
2458 @ref{arm_fp16fml_neon_ok} effective target keyword.
2326 2459
2327 @item bind_pic_locally 2460 @item bind_pic_locally
2328 Add the target-specific flags needed to enable functions to bind 2461 Add the target-specific flags needed to enable functions to bind
2329 locally when using pic/PIC passes in the testsuite. 2462 locally when using pic/PIC passes in the testsuite.
2330 2463
2479 assembly output. 2612 assembly output.
2480 @end table 2613 @end table
2481 2614
2482 @subsubsection Scan optimization dump files 2615 @subsubsection Scan optimization dump files
2483 2616
2484 These commands are available for @var{kind} of @code{tree}, @code{rtl}, 2617 These commands are available for @var{kind} of @code{tree}, @code{ltrans-tree},
2485 and @code{ipa}. 2618 @code{offload-tree}, @code{rtl}, @code{ipa}, and @code{wpa-ipa}.
2486 2619
2487 @table @code 2620 @table @code
2488 @item scan-@var{kind}-dump @var{regex} @var{suffix} [@{ target/xfail @var{selector} @}] 2621 @item scan-@var{kind}-dump @var{regex} @var{suffix} [@{ target/xfail @var{selector} @}]
2489 Passes if @var{regex} matches text in the dump file with suffix @var{suffix}. 2622 Passes if @var{regex} matches text in the dump file with suffix @var{suffix}.
2490 2623