8a8cfb
commit dc0afac3252d0c53716ccaf0b424f7769a66d695
8a8cfb
Author: marxin <mliska@suse.cz>
8a8cfb
Date:   Wed Feb 20 14:54:35 2019 +0100
8a8cfb
8a8cfb
    Add new Fortran vector math header file.
8a8cfb
8a8cfb
diff --git a/bits/math-vector-fortran.h b/bits/math-vector-fortran.h
8a8cfb
new file mode 100644
8a8cfb
index 0000000000000000..7c1e095094e24571
8a8cfb
--- /dev/null
8a8cfb
+++ b/bits/math-vector-fortran.h
8a8cfb
@@ -0,0 +1,19 @@
8a8cfb
+! Platform-specific declarations of SIMD math functions for Fortran. -*- f90 -*-
8a8cfb
+!   Copyright (C) 2019 Free Software Foundation, Inc.
8a8cfb
+!   This file is part of the GNU C Library.
8a8cfb
+!
8a8cfb
+!   The GNU C Library is free software; you can redistribute it and/or
8a8cfb
+!   modify it under the terms of the GNU Lesser General Public
8a8cfb
+!   License as published by the Free Software Foundation; either
8a8cfb
+!   version 2.1 of the License, or (at your option) any later version.
8a8cfb
+!
8a8cfb
+!   The GNU C Library is distributed in the hope that it will be useful,
8a8cfb
+!   but WITHOUT ANY WARRANTY; without even the implied warranty of
8a8cfb
+!   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
8a8cfb
+!   Lesser General Public License for more details.
8a8cfb
+!
8a8cfb
+!   You should have received a copy of the GNU Lesser General Public
8a8cfb
+!   License along with the GNU C Library; if not, see
8a8cfb
+!   <http://www.gnu.org/licenses/>.
8a8cfb
+
8a8cfb
+! No SIMD math functions are available for this platform.
8a8cfb
diff --git a/math/Makefile b/math/Makefile
8a8cfb
index 90b3b68916e12d85..16e68754fc863ea2 100644
8a8cfb
--- a/math/Makefile
8a8cfb
+++ b/math/Makefile
8a8cfb
@@ -26,6 +26,7 @@ headers		:= math.h bits/mathcalls.h bits/mathinline.h \
8a8cfb
 		   fpu_control.h complex.h bits/cmathcalls.h fenv.h \
8a8cfb
 		   bits/fenv.h bits/fenvinline.h bits/mathdef.h tgmath.h \
8a8cfb
 		   bits/math-finite.h bits/math-vector.h \
8a8cfb
+		   bits/math-vector-fortran.h \
8a8cfb
 		   bits/libm-simd-decl-stubs.h bits/iscanonical.h \
8a8cfb
 		   bits/flt-eval-method.h bits/fp-fast.h bits/fp-logb.h \
8a8cfb
 		   bits/long-double.h bits/mathcalls-helper-functions.h \
8a8cfb
diff --git a/sysdeps/x86/fpu/bits/math-vector-fortran.h b/sysdeps/x86/fpu/bits/math-vector-fortran.h
8a8cfb
new file mode 100644
8a8cfb
index 0000000000000000..36051cc73ea03602
8a8cfb
--- /dev/null
8a8cfb
+++ b/sysdeps/x86/fpu/bits/math-vector-fortran.h
8a8cfb
@@ -0,0 +1,43 @@
8a8cfb
+! Platform-specific declarations of SIMD math functions for Fortran. -*- f90 -*-
8a8cfb
+!   Copyright (C) 2019 Free Software Foundation, Inc.
8a8cfb
+!   This file is part of the GNU C Library.
8a8cfb
+!
8a8cfb
+!   The GNU C Library is free software; you can redistribute it and/or
8a8cfb
+!   modify it under the terms of the GNU Lesser General Public
8a8cfb
+!   License as published by the Free Software Foundation; either
8a8cfb
+!   version 2.1 of the License, or (at your option) any later version.
8a8cfb
+!
8a8cfb
+!   The GNU C Library is distributed in the hope that it will be useful,
8a8cfb
+!   but WITHOUT ANY WARRANTY; without even the implied warranty of
8a8cfb
+!   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
8a8cfb
+!   Lesser General Public License for more details.
8a8cfb
+!
8a8cfb
+!   You should have received a copy of the GNU Lesser General Public
8a8cfb
+!   License along with the GNU C Library; if not, see
8a8cfb
+!   <http://www.gnu.org/licenses/>.
8a8cfb
+
8a8cfb
+!GCC$ builtin (cos) attributes simd (notinbranch) if('x86_64')
8a8cfb
+!GCC$ builtin (cosf) attributes simd (notinbranch) if('x86_64')
8a8cfb
+!GCC$ builtin (sin) attributes simd (notinbranch) if('x86_64')
8a8cfb
+!GCC$ builtin (sinf) attributes simd (notinbranch) if('x86_64')
8a8cfb
+!GCC$ builtin (sincos) attributes simd (notinbranch) if('x86_64')
8a8cfb
+!GCC$ builtin (sincosf) attributes simd (notinbranch) if('x86_64')
8a8cfb
+!GCC$ builtin (log) attributes simd (notinbranch) if('x86_64')
8a8cfb
+!GCC$ builtin (logf) attributes simd (notinbranch) if('x86_64')
8a8cfb
+!GCC$ builtin (exp) attributes simd (notinbranch) if('x86_64')
8a8cfb
+!GCC$ builtin (expf) attributes simd (notinbranch) if('x86_64')
8a8cfb
+!GCC$ builtin (pow) attributes simd (notinbranch) if('x86_64')
8a8cfb
+!GCC$ builtin (powf) attributes simd (notinbranch) if('x86_64')
8a8cfb
+
8a8cfb
+!GCC$ builtin (cos) attributes simd (notinbranch) if('x32')
8a8cfb
+!GCC$ builtin (cosf) attributes simd (notinbranch) if('x32')
8a8cfb
+!GCC$ builtin (sin) attributes simd (notinbranch) if('x32')
8a8cfb
+!GCC$ builtin (sinf) attributes simd (notinbranch) if('x32')
8a8cfb
+!GCC$ builtin (sincos) attributes simd (notinbranch) if('x32')
8a8cfb
+!GCC$ builtin (sincosf) attributes simd (notinbranch) if('x32')
8a8cfb
+!GCC$ builtin (log) attributes simd (notinbranch) if('x32')
8a8cfb
+!GCC$ builtin (logf) attributes simd (notinbranch) if('x32')
8a8cfb
+!GCC$ builtin (exp) attributes simd (notinbranch) if('x32')
8a8cfb
+!GCC$ builtin (expf) attributes simd (notinbranch) if('x32')
8a8cfb
+!GCC$ builtin (pow) attributes simd (notinbranch) if('x32')
8a8cfb
+!GCC$ builtin (powf) attributes simd (notinbranch) if('x32')