Add new Fortran vector math header file.
Commit Message
Hi.
The patch adds support for Fortran vector math routines as added
into GCC 9. The header files will be installed to the same
folder as math-vector.h.
Thanks,
Martin
ChangeLog:
2019-02-18 Martin Liska <mliska@suse.cz>
* math/Makefile: Install math-vector-fortran.h.
* sysdeps/x86/fpu/bits/math-vector-fortran.h: New file.
---
math/Makefile | 1 +
sysdeps/x86/fpu/bits/math-vector-fortran.h | 43 ++++++++++++++++++++++
2 files changed, 44 insertions(+)
create mode 100644 sysdeps/x86/fpu/bits/math-vector-fortran.h
Comments
On Mon, 18 Feb 2019, Martin Liška wrote:
> Hi.
>
> The patch adds support for Fortran vector math routines as added
> into GCC 9. The header files will be installed to the same
> folder as math-vector.h.
>
> Thanks,
> Martin
>
> ChangeLog:
>
> 2019-02-18 Martin Liska <mliska@suse.cz>
>
> * math/Makefile: Install math-vector-fortran.h.
> * sysdeps/x86/fpu/bits/math-vector-fortran.h: New file.
If a header is installed for all architectures, it also needs to exist for
all architectures (presumably by having a dummy top-level
bits/math-vector-fortran.h for use on other architectures, like the
bits/math-vector.h there).
@@ -26,6 +26,7 @@ headers := math.h bits/mathcalls.h bits/mathinline.h \
fpu_control.h complex.h bits/cmathcalls.h fenv.h \
bits/fenv.h bits/fenvinline.h bits/mathdef.h tgmath.h \
bits/math-finite.h bits/math-vector.h \
+ bits/math-vector-fortran.h \
bits/libm-simd-decl-stubs.h bits/iscanonical.h \
bits/flt-eval-method.h bits/fp-fast.h bits/fp-logb.h \
bits/long-double.h bits/mathcalls-helper-functions.h \
new file mode 100644
@@ -0,0 +1,43 @@
+! Platform-specific Fortran SIMD declarations of math functions.
+! Copyright (C) 2019 Free Software Foundation, Inc.
+! This file is part of the GNU C Library.
+!
+! The GNU C Library is free software; you can redistribute it and/or
+! modify it under the terms of the GNU Lesser General Public
+! License as published by the Free Software Foundation; either
+! version 2.1 of the License, or (at your option) any later version.
+!
+! The GNU C Library is distributed in the hope that it will be useful,
+! but WITHOUT ANY WARRANTY; without even the implied warranty of
+! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+! Lesser General Public License for more details.
+!
+! You should have received a copy of the GNU Lesser General Public
+! License along with the GNU C Library; if not, see
+! <http://www.gnu.org/licenses/>. */
+
+!GCC$ builtin (cos) attributes simd (notinbranch) if('x86_64')
+!GCC$ builtin (cosf) attributes simd (notinbranch) if('x86_64')
+!GCC$ builtin (sin) attributes simd (notinbranch) if('x86_64')
+!GCC$ builtin (sinf) attributes simd (notinbranch) if('x86_64')
+!GCC$ builtin (sincos) attributes simd (notinbranch) if('x86_64')
+!GCC$ builtin (sincosf) attributes simd (notinbranch) if('x86_64')
+!GCC$ builtin (log) attributes simd (notinbranch) if('x86_64')
+!GCC$ builtin (logf) attributes simd (notinbranch) if('x86_64')
+!GCC$ builtin (exp) attributes simd (notinbranch) if('x86_64')
+!GCC$ builtin (expf) attributes simd (notinbranch) if('x86_64')
+!GCC$ builtin (pow) attributes simd (notinbranch) if('x86_64')
+!GCC$ builtin (powf) attributes simd (notinbranch) if('x86_64')
+
+!GCC$ builtin (cos) attributes simd (notinbranch) if('x32')
+!GCC$ builtin (cosf) attributes simd (notinbranch) if('x32')
+!GCC$ builtin (sin) attributes simd (notinbranch) if('x32')
+!GCC$ builtin (sinf) attributes simd (notinbranch) if('x32')
+!GCC$ builtin (sincos) attributes simd (notinbranch) if('x32')
+!GCC$ builtin (sincosf) attributes simd (notinbranch) if('x32')
+!GCC$ builtin (log) attributes simd (notinbranch) if('x32')
+!GCC$ builtin (logf) attributes simd (notinbranch) if('x32')
+!GCC$ builtin (exp) attributes simd (notinbranch) if('x32')
+!GCC$ builtin (expf) attributes simd (notinbranch) if('x32')
+!GCC$ builtin (pow) attributes simd (notinbranch) if('x32')
+!GCC$ builtin (powf) attributes simd (notinbranch) if('x32')