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
|
@node ax_gcc_builtin
@unnumberedsec ax_gcc_builtin
@majorheading Synopsis
@smallexample
AX_GCC_BUILTIN(BUILTIN)
@end smallexample
@majorheading Description
This macro checks if the compiler supports one of GCC's built-in
functions; many other compilers also provide those same built-ins.
The BUILTIN parameter is the name of the built-in function.
If BUILTIN is supported define HAVE_<BUILTIN>. Keep in mind that since
builtins usually start with two underscores they will be copied over
into the HAVE_<BUILTIN> definition (e.g. HAVE___BUILTIN_EXPECT for
__builtin_expect()).
The macro caches its result in the ax_cv_have_<BUILTIN> variable (e.g.
ax_cv_have___builtin_expect).
The macro currently supports the following built-in functions:
@smallexample
__builtin_assume_aligned
__builtin_bswap16
__builtin_bswap32
__builtin_bswap64
__builtin_choose_expr
__builtin___clear_cache
__builtin_clrsb
__builtin_clrsbl
__builtin_clrsbll
__builtin_clz
__builtin_clzl
__builtin_clzll
__builtin_complex
__builtin_constant_p
__builtin_ctz
__builtin_ctzl
__builtin_ctzll
__builtin_expect
__builtin_ffs
__builtin_ffsl
__builtin_ffsll
__builtin_fpclassify
__builtin_huge_val
__builtin_huge_valf
__builtin_huge_vall
__builtin_inf
__builtin_infd128
__builtin_infd32
__builtin_infd64
__builtin_inff
__builtin_infl
__builtin_isinf_sign
__builtin_nan
__builtin_nand128
__builtin_nand32
__builtin_nand64
__builtin_nanf
__builtin_nanl
__builtin_nans
__builtin_nansf
__builtin_nansl
__builtin_object_size
__builtin_parity
__builtin_parityl
__builtin_parityll
__builtin_popcount
__builtin_popcountl
__builtin_popcountll
__builtin_powi
__builtin_powif
__builtin_powil
__builtin_prefetch
__builtin_trap
__builtin_types_compatible_p
__builtin_unreachable
@end smallexample
Unsuppored built-ins will be tested with an empty parameter set and the
result of the check might be wrong or meaningless so use with care.
@majorheading Source Code
Download the
@uref{http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=blob_plain;f=m4/ax_gcc_builtin.m4,latest
version of @file{ax_gcc_builtin.m4}} or browse
@uref{http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=history;f=m4/ax_gcc_builtin.m4,the
macro's revision history}.
@majorheading License
@w{Copyright @copyright{} 2013 Gabriele Svelto @email{gabriele.svelto@@gmail.com}}
Copying and distribution of this file, with or without modification, are
permitted in any medium without royalty provided the copyright notice
and this notice are preserved. This file is offered as-is, without any
warranty.
|