| 1 | /* Define aliases for libm _Float128 functions. |
| 2 | Copyright (C) 2017-2019 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 | <http://www.gnu.org/licenses/>. */ |
| 18 | |
| 19 | #ifndef _LIBM_ALIAS_FLOAT128_H |
| 20 | #define _LIBM_ALIAS_FLOAT128_H |
| 21 | |
| 22 | #include <bits/floatn.h> |
| 23 | |
| 24 | /* Define _FloatN / _FloatNx aliases (other than that for _Float128) |
| 25 | for a _Float128 libm function that has internal name FROM ## f128 |
| 26 | ## R and public names TO ## suffix ## R for each suffix of a |
| 27 | supported _FloatN / _FloatNx floating-point type with the same |
| 28 | format as _Float128. */ |
| 29 | #if __HAVE_FLOAT64X && !__HAVE_FLOAT64X_LONG_DOUBLE |
| 30 | # define libm_alias_float128_other_r(from, to, r) \ |
| 31 | weak_alias (from ## f128 ## r, to ## f64x ## r) |
| 32 | #else |
| 33 | # define libm_alias_float128_other_r(from, to, r) |
| 34 | #endif |
| 35 | |
| 36 | /* Likewise, but without the R suffix. */ |
| 37 | #define libm_alias_float128_other(from, to) \ |
| 38 | libm_alias_float128_other_r (from, to, ) |
| 39 | |
| 40 | /* Define aliases for a _Float128 libm function that has internal name |
| 41 | FROM ## f128 ## R and public names TO ## suffix ## R for each |
| 42 | suffix of a supported floating-point type with the same format as |
| 43 | _Float128. This should only be used for functions where such |
| 44 | public names exist for _FloatN types, not for |
| 45 | implementation-namespace exported names (where there is one name |
| 46 | per format, not per type) or for obsolescent functions not provided |
| 47 | for _FloatN types. */ |
| 48 | #define libm_alias_float128_r(from, to, r) \ |
| 49 | weak_alias (from ## f128 ## r, to ## f128 ## r); \ |
| 50 | libm_alias_float128_other_r (from, to, r) |
| 51 | |
| 52 | /* Likewise, but without the R suffix. */ |
| 53 | #define libm_alias_float128(from, to) libm_alias_float128_r (from, to, ) |
| 54 | |
| 55 | #endif |
| 56 | |