]>
git.ipfire.org Git - thirdparty/glibc.git/blob - sysdeps/powerpc/fpu/math_private.h
37e7456bac65bcb0d4f7779c5ff0c26063a15deb
1 /* Private inline math functions for powerpc.
2 Copyright (C) 2006-2015 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
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.
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.
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/>. */
19 #ifndef _PPC_MATH_PRIVATE_H_
20 #define _PPC_MATH_PRIVATE_H_
24 #include <dl-procinfo.h>
25 #include <fenv_private.h>
26 #include_next <math_private.h>
28 extern double __slow_ieee754_sqrt (double);
29 extern __always_inline
double
30 __ieee754_sqrt (double __x
)
35 asm ("fsqrt %0,%1" : "=f" (__z
) : "f" (__x
));
37 __z
= __slow_ieee754_sqrt(__x
);
43 extern float __slow_ieee754_sqrtf (float);
44 extern __always_inline
float
45 __ieee754_sqrtf (float __x
)
50 asm ("fsqrts %0,%1" : "=f" (__z
) : "f" (__x
));
52 __z
= __slow_ieee754_sqrtf(__x
);
58 #if defined _ARCH_PWR5X
70 # define __roundf(x) \
90 # define __truncf(x) \
110 # define __ceilf(x) \
121 # define __floor(x) \
130 # define __floorf(x) \
140 #endif /* defined _ARCH_PWR5X */
142 #endif /* _PPC_MATH_PRIVATE_H_ */