Lines Matching +full:x +full:- +full:versions

1 //===-- int_math.h - internal math inlines --------------------------------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
12 // compiler-rt implementations, defined in such a way that there is not a direct
13 // dependency on libm or math.h. Instead, we use the compiler builtin versions
17 //===----------------------------------------------------------------------===//
23 #define __has_builtin(x) 0
38 #define crt_isfinite(x) _finite((x))
39 #define crt_isinf(x) !_finite((x))
40 #define crt_isnan(x) _isnan((x))
44 // versions of GCC which didn't have __builtin_isfinite.
46 #define crt_isfinite(x) __builtin_isfinite((x))
48 #define crt_isfinite(x) \
50 __typeof((x)) x_ = (x); \
56 #define crt_isinf(x) __builtin_isinf((x))
57 #define crt_isnan(x) __builtin_isnan((x))
61 #define crt_copysign(x, y) copysign((x), (y))
62 #define crt_copysignf(x, y) copysignf((x), (y))
63 #define crt_copysignl(x, y) copysignl((x), (y))
65 #define crt_copysign(x, y) __builtin_copysign((x), (y))
66 #define crt_copysignf(x, y) __builtin_copysignf((x), (y))
67 #define crt_copysignl(x, y) __builtin_copysignl((x), (y))
68 // We define __has_builtin to always return 0 for GCC versions below 10,
72 #define crt_copysignf128(x, y) __builtin_copysignf128((x), (y))
74 #define crt_copysignf128(x, y) __builtin_copysignq((x), (y))
79 #define crt_fabs(x) fabs((x))
80 #define crt_fabsf(x) fabsf((x))
81 #define crt_fabsl(x) fabs((x))
83 #define crt_fabs(x) __builtin_fabs((x))
84 #define crt_fabsf(x) __builtin_fabsf((x))
85 #define crt_fabsl(x) __builtin_fabsl((x))
86 // We define __has_builtin to always return 0 for GCC versions below 10,
89 #define crt_fabsf128(x) __builtin_fabsf128((x))
91 #define crt_fabsf128(x) __builtin_fabsq((x))
96 #define crt_fmaxl(x, y) __max((x), (y))
98 #define crt_fmaxl(x, y) __builtin_fmaxl((x), (y))
102 #define crt_logbl(x) logbl((x))
104 #define crt_logbl(x) __builtin_logbl((x))
108 #define crt_scalbnl(x, y) scalbnl((x), (y))
110 #define crt_scalbnl(x, y) __builtin_scalbnl((x), (y))