]> git.ipfire.org Git - thirdparty/glibc.git/blob - sysdeps/powerpc/powerpc64/le/fpu/multiarch/math-type-macros-float128.h
Update copyright dates with scripts/update-copyrights
[thirdparty/glibc.git] / sysdeps / powerpc / powerpc64 / le / fpu / multiarch / math-type-macros-float128.h
1 /* _Float128 overrides for float128 in ppc64le multiarch env.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
18
19 #ifndef _MATH_TYPE_MACROS_FLOAT128_PPC64_MULTI
20 #define _MATH_TYPE_MACROS_FLOAT128_PPC64_MULTI 1
21
22 #include_next <math-type-macros-float128.h>
23
24 #if !IS_IN(libc) && defined(_F128_ENABLE_IFUNC)
25
26 /* Include fenv.h now before turning off PLT bypass. At
27 minimum fereaiseexcept is used today. */
28 #include <fenv.h>
29
30 #include <float128-ifunc-macros.h>
31
32 /* Ensure local redirects are always disabled by including
33 math.h in the following manner. */
34 #undef NO_MATH_REDIRECT
35 #define NO_MATH_REDIRECT
36 #include <math.h>
37 #undef NO_MATH_REDIRECT
38
39 /* Include complex prototypes now to enable redirecting of
40 complex functions. */
41 #include <complex.h>
42
43 /* Declare redirects for a function f which has a complex
44 analogue. That is, __ ## f ## f128 and __c ## f ## f128. */
45 #define F128_C_REDIR(f) F128_REDIR (__c ## f ## f128); \
46 F128_REDIR (__ ## f ## f128); \
47
48 /* Similar to F128_C_REDIR, declare the set of implementation
49 redirects for the trigonometric family f for {a,}f{,h}
50 and {a,}cf{,h} complex variants where f is sin/cos/tan. */
51 #define F128_TRIG_REDIR(f) F128_C_REDIR (a ## f); \
52 F128_C_REDIR (a ## f ## h); \
53 F128_C_REDIR (f); \
54 F128_C_REDIR (f ## h);
55
56 F128_TRIG_REDIR (cos)
57 F128_TRIG_REDIR (sin)
58 F128_TRIG_REDIR (tan)
59
60 F128_C_REDIR (log);
61 F128_C_REDIR (log10);
62 F128_C_REDIR (exp);
63 F128_C_REDIR (sqrt);
64 F128_C_REDIR (pow);
65
66 F128_REDIR (__atan2f128)
67 F128_REDIR (__kernel_casinhf128);
68 F128_REDIR (__rintf128);
69 F128_REDIR (__floorf128);
70 F128_REDIR (__fabsf128);
71 F128_REDIR (__hypotf128);
72 F128_REDIR (__scalbnf128);
73 F128_REDIR (__scalblnf128);
74 F128_REDIR (__sincosf128);
75 F128_REDIR (__log1pf128);
76 F128_REDIR (__ilogbf128);
77 F128_REDIR (__ldexpf128);
78 F128_REDIR (__cargf128);
79 F128_REDIR (__cimagf128);
80 F128_REDIR (__crealf128);
81 F128_REDIR (__conjf128);
82 F128_REDIR (__cprojf128);
83 F128_REDIR (__cabsf128);
84 F128_REDIR (__fdimf128);
85 F128_REDIR (__fminf128);
86 F128_REDIR (__fmaxf128);
87 F128_REDIR (__fmodf128);
88 F128_REDIR (__llogbf128);
89 F128_REDIR (__log2f128);
90 F128_REDIR (__exp10f128);
91 F128_REDIR (__exp2f128);
92 F128_REDIR (__j0f128);
93 F128_REDIR (__j1f128);
94 F128_REDIR (__jnf128);
95 F128_REDIR (__y0f128);
96 F128_REDIR (__y1f128);
97 F128_REDIR (__ynf128);
98 F128_REDIR (__lgammaf128);
99 F128_REDIR_R (__lgammaf128, _r);
100 F128_REDIR (__tgammaf128);
101 F128_REDIR (__remainderf128);
102
103 /* This is ugly. Some wrapper functions are neither prototyped nor declared
104 uniformily (for various acceptable reasons). A prototype is supplied
105 to ensure they are appropriately ifunc'ed. */
106 extern _Float128 __wrap_scalbnf128 (_Float128, int);
107 extern _Float128 __w_scalblnf128 (_Float128, long int);
108 extern _Float128 __w_log1pf128 (_Float128);
109 extern _Float128 __scalbf128 (_Float128, _Float128);
110 F128_REDIR (__scalbf128);
111 F128_REDIR (__wrap_scalbnf128);
112 F128_REDIR (__w_scalblnf128);
113 F128_REDIR (__w_log1pf128);
114
115 /* Include the redirects shared with math_private.h users. */
116 #include <float128-ifunc-redirects.h>
117
118 #endif /* !IS_IN(libc) && defined(_F128_ENABLE_IFUNC) */
119
120 #endif /*_MATH_TYPE_MACROS_FLOAT128_PPC64_MULTI */