Compiler Intrinsics (ci_)
include/compiler/intrinsic.h View source View on GitHubPrefix Convention:
ci_ “Compiler Intrinsic” is for direct 1:1 or minimal wrappers around compiler builtins (_builtin*)
Macros
Section titled “Macros”ci_unreachable
Section titled “ci_unreachable”#define ci_unreachable() source Expansion
#define ci_unreachable() __builtin_unreachable() ci_expect
Section titled “ci_expect”ci_return_address
Section titled “ci_return_address”#define ci_return_address(level) source Expansion
#define ci_return_address(level) __builtin_return_address(level) ci_frame_address
Section titled “ci_frame_address”#define ci_frame_address(level) source Expansion
#define ci_frame_address(level) __builtin_frame_address(level) ci_extract_return_addr
Section titled “ci_extract_return_addr”#define ci_extract_return_addr(addr) source Expansion
#define ci_extract_return_addr(addr) __builtin_extract_return_addr(addr) ci_assume_aligned
Section titled “ci_assume_aligned”#define ci_assume_aligned(ptr, ...) source Expansion
#define ci_assume_aligned(ptr, ...) __builtin_assume_aligned((ptr), __VA_ARGS__) ci_clz
Section titled “ci_clz”ci_clzl
Section titled “ci_clzl”ci_clzll
Section titled “ci_clzll”ci_ctz
Section titled “ci_ctz”ci_ctzl
Section titled “ci_ctzl”ci_ctzll
Section titled “ci_ctzll”ci_popcount
Section titled “ci_popcount”#define ci_popcount(x) source Expansion
#define ci_popcount(x) __builtin_popcount(x) ci_popcountl
Section titled “ci_popcountl”#define ci_popcountl(x) source Expansion
#define ci_popcountl(x) __builtin_popcountl(x) ci_popcountll
Section titled “ci_popcountll”#define ci_popcountll(x) source Expansion
#define ci_popcountll(x) __builtin_popcountll(x) ci_ffs
Section titled “ci_ffs”ci_ffsl
Section titled “ci_ffsl”ci_ffsll
Section titled “ci_ffsll”ci_parity
Section titled “ci_parity”ci_parityl
Section titled “ci_parityl”#define ci_parityl(x) source Expansion
#define ci_parityl(x) __builtin_parityl(x) ci_parityll
Section titled “ci_parityll”#define ci_parityll(x) source Expansion
#define ci_parityll(x) __builtin_parityll(x) ci_bswap16
Section titled “ci_bswap16”#define ci_bswap16(x) source Expansion
#define ci_bswap16(x) __builtin_bswap16((uint16_t) (x)) ci_bswap32
Section titled “ci_bswap32”#define ci_bswap32(x) source Expansion
#define ci_bswap32(x) __builtin_bswap32((uint32_t) (x)) ci_bswap64
Section titled “ci_bswap64”#define ci_bswap64(x) source Expansion
#define ci_bswap64(x) __builtin_bswap64((uint64_t) (x)) ci_add_overflow
Section titled “ci_add_overflow”#define ci_add_overflow(a, b, res) source Expansion
#define ci_add_overflow(a, b, res) __builtin_add_overflow((a), (b), (res)) ci_sub_overflow
Section titled “ci_sub_overflow”#define ci_sub_overflow(a, b, res) source Expansion
#define ci_sub_overflow(a, b, res) __builtin_sub_overflow((a), (b), (res)) ci_mul_overflow
Section titled “ci_mul_overflow”#define ci_mul_overflow(a, b, res) source Expansion
#define ci_mul_overflow(a, b, res) __builtin_mul_overflow((a), (b), (res)) ci_add_overflow_p
Section titled “ci_add_overflow_p”#define ci_add_overflow_p(a, b, type) source Expansion
#define ci_add_overflow_p(a, b, type) __builtin_add_overflow_p((a), (b), (type)) ci_sub_overflow_p
Section titled “ci_sub_overflow_p”#define ci_sub_overflow_p(a, b, type) source Expansion
#define ci_sub_overflow_p(a, b, type) __builtin_sub_overflow_p((a), (b), (type)) ci_mul_overflow_p
Section titled “ci_mul_overflow_p”#define ci_mul_overflow_p(a, b, type) source Expansion
#define ci_mul_overflow_p(a, b, type) __builtin_mul_overflow_p((a), (b), (type)) ci_constant_p
Section titled “ci_constant_p”#define ci_constant_p(x) source Expansion
#define ci_constant_p(x) __builtin_constant_p(x) ci_choose_expr
Section titled “ci_choose_expr”#define ci_choose_expr(cond, a, b) source Expansion
#define ci_choose_expr(cond, a, b) __builtin_choose_expr((cond), (a), (b)) ci_types_compatible_p
Section titled “ci_types_compatible_p”#define ci_types_compatible_p(a, b) source Expansion
#define ci_types_compatible_p(a, b) __builtin_types_compatible_p(a, b) ci_offsetof
Section titled “ci_offsetof”#define ci_offsetof(type, member) source Expansion
#define ci_offsetof(type, member) __builtin_offsetof(type, member) ci_classify_type
Section titled “ci_classify_type”#define ci_classify_type(x) source Expansion
#define ci_classify_type(x) __builtin_classify_type(x) ci_object_size
Section titled “ci_object_size”#define ci_object_size(ptr, type) source Expansion
#define ci_object_size(ptr, type) __builtin_object_size((ptr), (type)) ci_dynamic_object_size
Section titled “ci_dynamic_object_size”#define ci_dynamic_object_size(ptr, type) source Expansion
#define ci_dynamic_object_size(ptr, type) \
__builtin_dynamic_object_size((ptr), (type)) ci_prefetch
Section titled “ci_prefetch”#define ci_prefetch(addr, ...) source Expansion
#define ci_prefetch(addr, ...) __builtin_prefetch((addr), __VA_ARGS__) ci_trap
Section titled “ci_trap”ci_memcpy
Section titled “ci_memcpy”#define ci_memcpy(dest, src, n) source Expansion
#define ci_memcpy(dest, src, n) __builtin_memcpy((dest), (src), (n)) ci_memset
Section titled “ci_memset”#define ci_memset(s, c, n) source Expansion
#define ci_memset(s, c, n) __builtin_memset((s), (c), (n)) ci_memmove
Section titled “ci_memmove”#define ci_memmove(dest, src, n) source Expansion
#define ci_memmove(dest, src, n) __builtin_memmove((dest), (src), (n))