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