Make sure the Fortran specifics have real(kind=16).
This brings the library to compile with all specific functions. It also corrects the patsubst patterns so the right files get the flags. It was necessary to manually add -D__powerpc64__ because apparently this is not set for Fortran. libgfortran/ChangeLog: * Makefile.am: Correct files for compilation flags. Add -D__powerpc64__ for Fortran sources. Get kinds.inc from grep of kinds.h and kinds-override.h. * Makefile.in: Regenerate. * config.h.in: Regenerate. * configure: Regenerate. * configure.ac: Add -mno-gnu-attribute to compile flags. * generated/_abs_c17.F90: Regenerate. * generated/_abs_r17.F90: Regenerate. * generated/_acos_r17.F90: Regenerate. * generated/_acosh_r17.F90: Regenerate. * generated/_aimag_c17.F90: Regenerate. * generated/_aint_r17.F90: Regenerate. * generated/_anint_r17.F90: Regenerate. * generated/_asin_r17.F90: Regenerate. * generated/_asinh_r17.F90: Regenerate. * generated/_atan2_r17.F90: Regenerate. * generated/_atan_r17.F90: Regenerate. * generated/_atanh_r17.F90: Regenerate. * generated/_conjg_c17.F90: Regenerate. * generated/_cos_c17.F90: Regenerate. * generated/_cos_r17.F90: Regenerate. * generated/_cosh_r17.F90: Regenerate. * generated/_dim_r17.F90: Regenerate. * generated/_exp_c17.F90: Regenerate. * generated/_exp_r17.F90: Regenerate. * generated/_log10_r17.F90: Regenerate. * generated/_log_c17.F90: Regenerate. * generated/_log_r17.F90: Regenerate. * generated/_mod_r17.F90: Regenerate. * generated/_sign_r17.F90: Regenerate. * generated/_sin_c17.F90: Regenerate. * generated/_sin_r17.F90: Regenerate. * generated/_sinh_r17.F90: Regenerate. * generated/_sqrt_c17.F90: Regenerate. * generated/_sqrt_r17.F90: Regenerate. * generated/_tan_r17.F90: Regenerate. * generated/_tanh_r17.F90: Regenerate. * kinds-override.h: Adjust to trunk. Change condition to single line so it can be grepped. * m4/specific.m4: Make sure that real=kind16 is used for _r17.F90 and _c17.F90 files. * m4/specific2.m4: Likewise.
This commit is contained in:
parent
90d6f0c71d
commit
a8fea8cd86
libgfortran
Makefile.amMakefile.inconfig.h.inconfigureconfigure.ac
generated
_abs_c17.F90_abs_r17.F90_acos_r17.F90_acosh_r17.F90_aimag_c17.F90_aint_r17.F90_anint_r17.F90_asin_r17.F90_asinh_r17.F90_atan2_r17.F90_atan_r17.F90_atanh_r17.F90_conjg_c17.F90_cos_c17.F90_cos_r17.F90_cosh_r17.F90_dim_r17.F90_exp_c17.F90_exp_r17.F90_log10_r17.F90_log_c17.F90_log_r17.F90_mod_r17.F90_sign_r17.F90_sin_c17.F90_sin_r17.F90_sinh_r17.F90_sqrt_c17.F90_sqrt_r17.F90_tan_r17.F90_tanh_r17.F90
kinds-override.hm4
@ -1077,15 +1077,16 @@ $(patsubst %.F90,%.lo,$(patsubst %.f90,%.lo,$(notdir $(gfor_specific_src)))): AM
|
||||
selected_real_kind.lo selected_int_kind.lo: AM_FCFLAGS += -fallow-leading-underscore
|
||||
|
||||
# Build *_r17.F90 and *_c17.F90 with additional -mabi=ieeelongdouble on powerpc64le-linux.
|
||||
|
||||
if HAVE_REAL_17
|
||||
$(patsubst %_r17.F90,%.lo,$(notdir $(gfor_specific_src))): AM_FCFLAGS += -mabi=ieeelongdouble
|
||||
$(patsubst %_r17.c,%.lo,$(notdir $(gfor_specific_src))): AM_FCFLAGS += -mabi=ieeelongdouble
|
||||
$(patsubst %_c17.F90,%.lo,$(notdir $(gfor_specific_src))): AM_FCFLAGS += -mabi=ieeelongdouble
|
||||
$(patsubst %_c17.c,%.lo,$(notdir $(gfor_specific_src))): AM_FCFLAGS += -mabi=ieeelongdouble
|
||||
$(patsubst %_r16.F90,%.lo,$(notdir $(gfor_specific_src))): AM_FCFLAGS += -mabi=ibmlongdouble
|
||||
$(patsubst %_r16.c,%.lo,$(notdir $(gfor_specific_src))): AM_FCFLAGS += -mabi=ibmlongdouble
|
||||
$(patsubst %_c16.F90,%.lo,$(notdir $(gfor_specific_src))): AM_FCFLAGS += -mabi=ibmlongdouble
|
||||
$(patsubst %_c16.c,%.lo,$(notdir $(gfor_specific_src))): AM_FCFLAGS += -mabi=ibmlongdouble
|
||||
$(patsubst %_r16.F90,%_r16.lo,$(notdir $(gfor_specific_src))): AM_FCFLAGS += -mabi=ibmlongdouble
|
||||
$(patsubst %_c16.F90,%_c16.lo,$(notdir $(gfor_specific_src))): AM_FCFLAGS += -mabi=ibmlongdouble
|
||||
$(patsubst %_r17.F90,%_r17.lo,$(notdir $(gfor_specific_src))): AM_FCFLAGS += -mabi=ieeelongdouble -D__powerpc64__
|
||||
$(patsubst %_c17.F90,%_c17.lo,$(notdir $(gfor_specific_src))): AM_FCFLAGS += -mabi=ieeelongdouble -D__powerpc64__
|
||||
$(patsubst %_r16.c,%_r16.lo,$(notdir $(gfor_built_src))): AM_CFLAGS += -mabi=ibmlongdouble
|
||||
$(patsubst %_c16.c,%_c16.lo,$(notdir $(gfor_built_src))): AM_CFLAGS += -mabi=ibmlongdouble
|
||||
$(patsubst %_r17.c,%_r17.lo,$(notdir $(gfor_built_src))): AM_CFLAGS += -mabi=ieeelongdouble
|
||||
$(patsubst %_c17.c,%_c17.lo,$(notdir $(gfor_built_src))): AM_CFLAGS += -mabi=ieeelongdouble
|
||||
endif
|
||||
|
||||
if IEEE_SUPPORT
|
||||
@ -1160,8 +1161,8 @@ I_M4_DEPS9=$(I_M4_DEPS) m4/ifindloc2.m4
|
||||
kinds.h: $(srcdir)/mk-kinds-h.sh
|
||||
$(SHELL) $(srcdir)/mk-kinds-h.sh '@LIBGOMP_CHECKED_INT_KINDS@' '@LIBGOMP_CHECKED_REAL_KINDS@' '$(FCCOMPILE)' > $@ || rm $@
|
||||
|
||||
kinds.inc: kinds.h
|
||||
grep '^#' < kinds.h > $@
|
||||
kinds.inc: kinds.h $(srcdir)/kinds-override.h
|
||||
cat kinds.h $(srcdir)/kinds-override.h | grep '^#' | grep -v include > $@
|
||||
|
||||
c99_protos.inc: $(srcdir)/c99_protos.h
|
||||
grep '^#' < $(srcdir)/c99_protos.h > $@
|
||||
|
@ -7630,14 +7630,15 @@ $(patsubst %.F90,%.lo,$(patsubst %.f90,%.lo,$(notdir $(gfor_specific_src)))): AM
|
||||
selected_real_kind.lo selected_int_kind.lo: AM_FCFLAGS += -fallow-leading-underscore
|
||||
|
||||
# Build *_r17.F90 and *_c17.F90 with additional -mabi=ieeelongdouble on powerpc64le-linux.
|
||||
@HAVE_REAL_17_TRUE@$(patsubst %_r17.F90,%.lo,$(notdir $(gfor_specific_src))): AM_FCFLAGS += -mabi=ieeelongdouble
|
||||
@HAVE_REAL_17_TRUE@$(patsubst %_r17.c,%.lo,$(notdir $(gfor_specific_src))): AM_FCFLAGS += -mabi=ieeelongdouble
|
||||
@HAVE_REAL_17_TRUE@$(patsubst %_c17.F90,%.lo,$(notdir $(gfor_specific_src))): AM_FCFLAGS += -mabi=ieeelongdouble
|
||||
@HAVE_REAL_17_TRUE@$(patsubst %_c17.c,%.lo,$(notdir $(gfor_specific_src))): AM_FCFLAGS += -mabi=ieeelongdouble
|
||||
@HAVE_REAL_17_TRUE@$(patsubst %_r16.F90,%.lo,$(notdir $(gfor_specific_src))): AM_FCFLAGS += -mabi=ibmlongdouble
|
||||
@HAVE_REAL_17_TRUE@$(patsubst %_r16.c,%.lo,$(notdir $(gfor_specific_src))): AM_FCFLAGS += -mabi=ibmlongdouble
|
||||
@HAVE_REAL_17_TRUE@$(patsubst %_c16.F90,%.lo,$(notdir $(gfor_specific_src))): AM_FCFLAGS += -mabi=ibmlongdouble
|
||||
@HAVE_REAL_17_TRUE@$(patsubst %_c16.c,%.lo,$(notdir $(gfor_specific_src))): AM_FCFLAGS += -mabi=ibmlongdouble
|
||||
|
||||
@HAVE_REAL_17_TRUE@$(patsubst %_r16.F90,%_r16.lo,$(notdir $(gfor_specific_src))): AM_FCFLAGS += -mabi=ibmlongdouble
|
||||
@HAVE_REAL_17_TRUE@$(patsubst %_c16.F90,%_c16.lo,$(notdir $(gfor_specific_src))): AM_FCFLAGS += -mabi=ibmlongdouble
|
||||
@HAVE_REAL_17_TRUE@$(patsubst %_r17.F90,%_r17.lo,$(notdir $(gfor_specific_src))): AM_FCFLAGS += -mabi=ieeelongdouble -D__powerpc64__
|
||||
@HAVE_REAL_17_TRUE@$(patsubst %_c17.F90,%_c17.lo,$(notdir $(gfor_specific_src))): AM_FCFLAGS += -mabi=ieeelongdouble -D__powerpc64__
|
||||
@HAVE_REAL_17_TRUE@$(patsubst %_r16.c,%_r16.lo,$(notdir $(gfor_built_src))): AM_CFLAGS += -mabi=ibmlongdouble
|
||||
@HAVE_REAL_17_TRUE@$(patsubst %_c16.c,%_c16.lo,$(notdir $(gfor_built_src))): AM_CFLAGS += -mabi=ibmlongdouble
|
||||
@HAVE_REAL_17_TRUE@$(patsubst %_r17.c,%_r17.lo,$(notdir $(gfor_built_src))): AM_CFLAGS += -mabi=ieeelongdouble
|
||||
@HAVE_REAL_17_TRUE@$(patsubst %_c17.c,%_c17.lo,$(notdir $(gfor_built_src))): AM_CFLAGS += -mabi=ieeelongdouble
|
||||
|
||||
# Add flags for IEEE modules
|
||||
@IEEE_SUPPORT_TRUE@$(patsubst %.F90,%.lo,$(notdir $(gfor_ieee_src))): AM_FCFLAGS += -Wno-unused-dummy-argument -Wno-c-binding-type -ffree-line-length-0 -fallow-leading-underscore -fsignaling-nans
|
||||
@ -7667,8 +7668,8 @@ ieee_arithmetic.mod: ieee_arithmetic.lo
|
||||
kinds.h: $(srcdir)/mk-kinds-h.sh
|
||||
$(SHELL) $(srcdir)/mk-kinds-h.sh '@LIBGOMP_CHECKED_INT_KINDS@' '@LIBGOMP_CHECKED_REAL_KINDS@' '$(FCCOMPILE)' > $@ || rm $@
|
||||
|
||||
kinds.inc: kinds.h
|
||||
grep '^#' < kinds.h > $@
|
||||
kinds.inc: kinds.h $(srcdir)/kinds-override.h
|
||||
cat kinds.h $(srcdir)/kinds-override.h | grep '^#' | grep -v include > $@
|
||||
|
||||
c99_protos.inc: $(srcdir)/c99_protos.h
|
||||
grep '^#' < $(srcdir)/c99_protos.h > $@
|
||||
|
@ -663,6 +663,9 @@
|
||||
/* Define to 1 if you have the <pwd.h> header file. */
|
||||
#undef HAVE_PWD_H
|
||||
|
||||
/* Define to 1 if you have REAL(KIND=17) */
|
||||
#undef HAVE_REAL_17
|
||||
|
||||
/* Define to 1 if you have the `round' function. */
|
||||
#undef HAVE_ROUND
|
||||
|
||||
|
12
libgfortran/configure
vendored
12
libgfortran/configure
vendored
@ -6013,9 +6013,9 @@ main ()
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_cpp "$LINENO"; then :
|
||||
AM_FCFLAGS="$AM_FCFLAGS -mabi=ibmlongdouble";
|
||||
AM_CFLAGS="$AM_CFLAGS -mabi=ibmlongdouble";
|
||||
CFLAGS="$CFLAGS -mabi=ibmlongdouble";
|
||||
AM_FCFLAGS="$AM_FCFLAGS -mabi=ibmlongdouble -mno-gnu-attribute";
|
||||
AM_CFLAGS="$AM_CFLAGS -mabi=ibmlongdouble -mno-gnu-attribute";
|
||||
CFLAGS="$CFLAGS -mabi=ibmlongdouble -mno-gnu-attribute";
|
||||
have_real_17=yes
|
||||
fi
|
||||
rm -f conftest.err conftest.i conftest.$ac_ext
|
||||
@ -25838,6 +25838,12 @@ _ACEOF
|
||||
|
||||
if test "x$have_real_17" = "xyes"; then
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_REAL_17 1
|
||||
_ACEOF
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __acoshieee128" >&5
|
||||
|
@ -163,9 +163,9 @@ if test "x$GCC" = "xyes"; then
|
||||
#error long double is double
|
||||
#endif]],
|
||||
[[(void) 0;]])],
|
||||
[AM_FCFLAGS="$AM_FCFLAGS -mabi=ibmlongdouble";
|
||||
AM_CFLAGS="$AM_CFLAGS -mabi=ibmlongdouble";
|
||||
CFLAGS="$CFLAGS -mabi=ibmlongdouble";
|
||||
[AM_FCFLAGS="$AM_FCFLAGS -mabi=ibmlongdouble -mno-gnu-attribute";
|
||||
AM_CFLAGS="$AM_CFLAGS -mabi=ibmlongdouble -mno-gnu-attribute";
|
||||
CFLAGS="$CFLAGS -mabi=ibmlongdouble -mno-gnu-attribute";
|
||||
have_real_17=yes])
|
||||
;;
|
||||
*)
|
||||
@ -547,6 +547,9 @@ GCC_CHECK_MATH_FUNC([catanl])
|
||||
# For POWER, check the ieee128 math functions
|
||||
|
||||
if test "x$have_real_17" = "xyes"; then
|
||||
AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_REAL_17),[1],
|
||||
[Define to 1 if you have REAL(KIND=17)])
|
||||
|
||||
LIBGFOR_CHECK_MATH_IEEE128([__acoshieee128])
|
||||
LIBGFOR_CHECK_MATH_IEEE128([__acosieee128])
|
||||
LIBGFOR_CHECK_MATH_IEEE128([__asinhieee128])
|
||||
|
@ -33,11 +33,11 @@
|
||||
#include "c99_protos.inc"
|
||||
|
||||
#if defined (HAVE_GFC_COMPLEX_17)
|
||||
#ifdef HAVE_CABS_17
|
||||
#ifdef HAVE_CABSL
|
||||
|
||||
elemental function _gfortran_specific__abs_c17 (parm)
|
||||
complex (kind=17), intent (in) :: parm
|
||||
real (kind=17) :: _gfortran_specific__abs_c17
|
||||
complex (kind=16), intent (in) :: parm
|
||||
real (kind=16) :: _gfortran_specific__abs_c17
|
||||
|
||||
_gfortran_specific__abs_c17 = abs (parm)
|
||||
end function
|
||||
|
@ -33,11 +33,11 @@
|
||||
#include "c99_protos.inc"
|
||||
|
||||
#if defined (HAVE_GFC_REAL_17)
|
||||
#ifdef HAVE_FABS_17
|
||||
#ifdef HAVE_FABSL
|
||||
|
||||
elemental function _gfortran_specific__abs_r17 (parm)
|
||||
real (kind=17), intent (in) :: parm
|
||||
real (kind=17) :: _gfortran_specific__abs_r17
|
||||
real (kind=16), intent (in) :: parm
|
||||
real (kind=16) :: _gfortran_specific__abs_r17
|
||||
|
||||
_gfortran_specific__abs_r17 = abs (parm)
|
||||
end function
|
||||
|
@ -33,11 +33,11 @@
|
||||
#include "c99_protos.inc"
|
||||
|
||||
#if defined (HAVE_GFC_REAL_17)
|
||||
#ifdef HAVE_ACOS_17
|
||||
#ifdef HAVE_ACOSL
|
||||
|
||||
elemental function _gfortran_specific__acos_r17 (parm)
|
||||
real (kind=17), intent (in) :: parm
|
||||
real (kind=17) :: _gfortran_specific__acos_r17
|
||||
real (kind=16), intent (in) :: parm
|
||||
real (kind=16) :: _gfortran_specific__acos_r17
|
||||
|
||||
_gfortran_specific__acos_r17 = acos (parm)
|
||||
end function
|
||||
|
@ -33,11 +33,11 @@
|
||||
#include "c99_protos.inc"
|
||||
|
||||
#if defined (HAVE_GFC_REAL_17)
|
||||
#ifdef HAVE_ACOSH_17
|
||||
#ifdef HAVE_ACOSHL
|
||||
|
||||
elemental function _gfortran_specific__acosh_r17 (parm)
|
||||
real (kind=17), intent (in) :: parm
|
||||
real (kind=17) :: _gfortran_specific__acosh_r17
|
||||
real (kind=16), intent (in) :: parm
|
||||
real (kind=16) :: _gfortran_specific__acosh_r17
|
||||
|
||||
_gfortran_specific__acosh_r17 = acosh (parm)
|
||||
end function
|
||||
|
@ -36,8 +36,8 @@
|
||||
|
||||
|
||||
elemental function _gfortran_specific__aimag_c17 (parm)
|
||||
complex (kind=17), intent (in) :: parm
|
||||
real (kind=17) :: _gfortran_specific__aimag_c17
|
||||
complex (kind=16), intent (in) :: parm
|
||||
real (kind=16) :: _gfortran_specific__aimag_c17
|
||||
|
||||
_gfortran_specific__aimag_c17 = aimag (parm)
|
||||
end function
|
||||
|
@ -33,11 +33,11 @@
|
||||
#include "c99_protos.inc"
|
||||
|
||||
#if defined (HAVE_GFC_REAL_17)
|
||||
#ifdef HAVE_TRUNC_17
|
||||
#ifdef HAVE_TRUNCL
|
||||
|
||||
elemental function _gfortran_specific__aint_r17 (parm)
|
||||
real (kind=17), intent (in) :: parm
|
||||
real (kind=17) :: _gfortran_specific__aint_r17
|
||||
real (kind=16), intent (in) :: parm
|
||||
real (kind=16) :: _gfortran_specific__aint_r17
|
||||
|
||||
_gfortran_specific__aint_r17 = aint (parm)
|
||||
end function
|
||||
|
@ -33,11 +33,11 @@
|
||||
#include "c99_protos.inc"
|
||||
|
||||
#if defined (HAVE_GFC_REAL_17)
|
||||
#ifdef HAVE_ROUND_17
|
||||
#ifdef HAVE_ROUNDL
|
||||
|
||||
elemental function _gfortran_specific__anint_r17 (parm)
|
||||
real (kind=17), intent (in) :: parm
|
||||
real (kind=17) :: _gfortran_specific__anint_r17
|
||||
real (kind=16), intent (in) :: parm
|
||||
real (kind=16) :: _gfortran_specific__anint_r17
|
||||
|
||||
_gfortran_specific__anint_r17 = anint (parm)
|
||||
end function
|
||||
|
@ -33,11 +33,11 @@
|
||||
#include "c99_protos.inc"
|
||||
|
||||
#if defined (HAVE_GFC_REAL_17)
|
||||
#ifdef HAVE_ASIN_17
|
||||
#ifdef HAVE_ASINL
|
||||
|
||||
elemental function _gfortran_specific__asin_r17 (parm)
|
||||
real (kind=17), intent (in) :: parm
|
||||
real (kind=17) :: _gfortran_specific__asin_r17
|
||||
real (kind=16), intent (in) :: parm
|
||||
real (kind=16) :: _gfortran_specific__asin_r17
|
||||
|
||||
_gfortran_specific__asin_r17 = asin (parm)
|
||||
end function
|
||||
|
@ -33,11 +33,11 @@
|
||||
#include "c99_protos.inc"
|
||||
|
||||
#if defined (HAVE_GFC_REAL_17)
|
||||
#ifdef HAVE_ASINH_17
|
||||
#ifdef HAVE_ASINHL
|
||||
|
||||
elemental function _gfortran_specific__asinh_r17 (parm)
|
||||
real (kind=17), intent (in) :: parm
|
||||
real (kind=17) :: _gfortran_specific__asinh_r17
|
||||
real (kind=16), intent (in) :: parm
|
||||
real (kind=16) :: _gfortran_specific__asinh_r17
|
||||
|
||||
_gfortran_specific__asinh_r17 = asinh (parm)
|
||||
end function
|
||||
|
@ -32,11 +32,11 @@
|
||||
|
||||
#if defined (HAVE_GFC_REAL_17)
|
||||
|
||||
#ifdef HAVE_ATAN2_17
|
||||
#ifdef HAVE_ATAN2L
|
||||
|
||||
elemental function _gfortran_specific__atan2_r17 (p1, p2)
|
||||
real (kind=17), intent (in) :: p1, p2
|
||||
real (kind=17) :: _gfortran_specific__atan2_r17
|
||||
real (kind=16), intent (in) :: p1, p2
|
||||
real (kind=16) :: _gfortran_specific__atan2_r17
|
||||
|
||||
_gfortran_specific__atan2_r17 = atan2 (p1, p2)
|
||||
end function
|
||||
|
@ -33,11 +33,11 @@
|
||||
#include "c99_protos.inc"
|
||||
|
||||
#if defined (HAVE_GFC_REAL_17)
|
||||
#ifdef HAVE_ATAN_17
|
||||
#ifdef HAVE_ATANL
|
||||
|
||||
elemental function _gfortran_specific__atan_r17 (parm)
|
||||
real (kind=17), intent (in) :: parm
|
||||
real (kind=17) :: _gfortran_specific__atan_r17
|
||||
real (kind=16), intent (in) :: parm
|
||||
real (kind=16) :: _gfortran_specific__atan_r17
|
||||
|
||||
_gfortran_specific__atan_r17 = atan (parm)
|
||||
end function
|
||||
|
@ -33,11 +33,11 @@
|
||||
#include "c99_protos.inc"
|
||||
|
||||
#if defined (HAVE_GFC_REAL_17)
|
||||
#ifdef HAVE_ATANH_17
|
||||
#ifdef HAVE_ATANHL
|
||||
|
||||
elemental function _gfortran_specific__atanh_r17 (parm)
|
||||
real (kind=17), intent (in) :: parm
|
||||
real (kind=17) :: _gfortran_specific__atanh_r17
|
||||
real (kind=16), intent (in) :: parm
|
||||
real (kind=16) :: _gfortran_specific__atanh_r17
|
||||
|
||||
_gfortran_specific__atanh_r17 = atanh (parm)
|
||||
end function
|
||||
|
@ -36,8 +36,8 @@
|
||||
|
||||
|
||||
elemental function _gfortran_specific__conjg_17 (parm)
|
||||
complex (kind=17), intent (in) :: parm
|
||||
complex (kind=17) :: _gfortran_specific__conjg_17
|
||||
complex (kind=16), intent (in) :: parm
|
||||
complex (kind=16) :: _gfortran_specific__conjg_17
|
||||
|
||||
_gfortran_specific__conjg_17 = conjg (parm)
|
||||
end function
|
||||
|
@ -33,11 +33,11 @@
|
||||
#include "c99_protos.inc"
|
||||
|
||||
#if defined (HAVE_GFC_COMPLEX_17)
|
||||
#ifdef HAVE_CCOS_17
|
||||
#ifdef HAVE_CCOSL
|
||||
|
||||
elemental function _gfortran_specific__cos_c17 (parm)
|
||||
complex (kind=17), intent (in) :: parm
|
||||
complex (kind=17) :: _gfortran_specific__cos_c17
|
||||
complex (kind=16), intent (in) :: parm
|
||||
complex (kind=16) :: _gfortran_specific__cos_c17
|
||||
|
||||
_gfortran_specific__cos_c17 = cos (parm)
|
||||
end function
|
||||
|
@ -33,11 +33,11 @@
|
||||
#include "c99_protos.inc"
|
||||
|
||||
#if defined (HAVE_GFC_REAL_17)
|
||||
#ifdef HAVE_COS_17
|
||||
#ifdef HAVE_COSL
|
||||
|
||||
elemental function _gfortran_specific__cos_r17 (parm)
|
||||
real (kind=17), intent (in) :: parm
|
||||
real (kind=17) :: _gfortran_specific__cos_r17
|
||||
real (kind=16), intent (in) :: parm
|
||||
real (kind=16) :: _gfortran_specific__cos_r17
|
||||
|
||||
_gfortran_specific__cos_r17 = cos (parm)
|
||||
end function
|
||||
|
@ -33,11 +33,11 @@
|
||||
#include "c99_protos.inc"
|
||||
|
||||
#if defined (HAVE_GFC_REAL_17)
|
||||
#ifdef HAVE_COSH_17
|
||||
#ifdef HAVE_COSHL
|
||||
|
||||
elemental function _gfortran_specific__cosh_r17 (parm)
|
||||
real (kind=17), intent (in) :: parm
|
||||
real (kind=17) :: _gfortran_specific__cosh_r17
|
||||
real (kind=16), intent (in) :: parm
|
||||
real (kind=16) :: _gfortran_specific__cosh_r17
|
||||
|
||||
_gfortran_specific__cosh_r17 = cosh (parm)
|
||||
end function
|
||||
|
@ -35,8 +35,8 @@
|
||||
|
||||
|
||||
elemental function _gfortran_specific__dim_r17 (p1, p2)
|
||||
real (kind=17), intent (in) :: p1, p2
|
||||
real (kind=17) :: _gfortran_specific__dim_r17
|
||||
real (kind=16), intent (in) :: p1, p2
|
||||
real (kind=16) :: _gfortran_specific__dim_r17
|
||||
|
||||
_gfortran_specific__dim_r17 = dim (p1, p2)
|
||||
end function
|
||||
|
@ -33,11 +33,11 @@
|
||||
#include "c99_protos.inc"
|
||||
|
||||
#if defined (HAVE_GFC_COMPLEX_17)
|
||||
#ifdef HAVE_CEXP_17
|
||||
#ifdef HAVE_CEXPL
|
||||
|
||||
elemental function _gfortran_specific__exp_c17 (parm)
|
||||
complex (kind=17), intent (in) :: parm
|
||||
complex (kind=17) :: _gfortran_specific__exp_c17
|
||||
complex (kind=16), intent (in) :: parm
|
||||
complex (kind=16) :: _gfortran_specific__exp_c17
|
||||
|
||||
_gfortran_specific__exp_c17 = exp (parm)
|
||||
end function
|
||||
|
@ -33,11 +33,11 @@
|
||||
#include "c99_protos.inc"
|
||||
|
||||
#if defined (HAVE_GFC_REAL_17)
|
||||
#ifdef HAVE_EXP_17
|
||||
#ifdef HAVE_EXPL
|
||||
|
||||
elemental function _gfortran_specific__exp_r17 (parm)
|
||||
real (kind=17), intent (in) :: parm
|
||||
real (kind=17) :: _gfortran_specific__exp_r17
|
||||
real (kind=16), intent (in) :: parm
|
||||
real (kind=16) :: _gfortran_specific__exp_r17
|
||||
|
||||
_gfortran_specific__exp_r17 = exp (parm)
|
||||
end function
|
||||
|
@ -33,11 +33,11 @@
|
||||
#include "c99_protos.inc"
|
||||
|
||||
#if defined (HAVE_GFC_REAL_17)
|
||||
#ifdef HAVE_LOG10_17
|
||||
#ifdef HAVE_LOG10L
|
||||
|
||||
elemental function _gfortran_specific__log10_r17 (parm)
|
||||
real (kind=17), intent (in) :: parm
|
||||
real (kind=17) :: _gfortran_specific__log10_r17
|
||||
real (kind=16), intent (in) :: parm
|
||||
real (kind=16) :: _gfortran_specific__log10_r17
|
||||
|
||||
_gfortran_specific__log10_r17 = log10 (parm)
|
||||
end function
|
||||
|
@ -33,11 +33,11 @@
|
||||
#include "c99_protos.inc"
|
||||
|
||||
#if defined (HAVE_GFC_COMPLEX_17)
|
||||
#ifdef HAVE_CLOG_17
|
||||
#ifdef HAVE_CLOGL
|
||||
|
||||
elemental function _gfortran_specific__log_c17 (parm)
|
||||
complex (kind=17), intent (in) :: parm
|
||||
complex (kind=17) :: _gfortran_specific__log_c17
|
||||
complex (kind=16), intent (in) :: parm
|
||||
complex (kind=16) :: _gfortran_specific__log_c17
|
||||
|
||||
_gfortran_specific__log_c17 = log (parm)
|
||||
end function
|
||||
|
@ -33,11 +33,11 @@
|
||||
#include "c99_protos.inc"
|
||||
|
||||
#if defined (HAVE_GFC_REAL_17)
|
||||
#ifdef HAVE_LOG_17
|
||||
#ifdef HAVE_LOGL
|
||||
|
||||
elemental function _gfortran_specific__log_r17 (parm)
|
||||
real (kind=17), intent (in) :: parm
|
||||
real (kind=17) :: _gfortran_specific__log_r17
|
||||
real (kind=16), intent (in) :: parm
|
||||
real (kind=16) :: _gfortran_specific__log_r17
|
||||
|
||||
_gfortran_specific__log_r17 = log (parm)
|
||||
end function
|
||||
|
@ -35,8 +35,8 @@
|
||||
|
||||
|
||||
elemental function _gfortran_specific__mod_r17 (p1, p2)
|
||||
real (kind=17), intent (in) :: p1, p2
|
||||
real (kind=17) :: _gfortran_specific__mod_r17
|
||||
real (kind=16), intent (in) :: p1, p2
|
||||
real (kind=16) :: _gfortran_specific__mod_r17
|
||||
|
||||
_gfortran_specific__mod_r17 = mod (p1, p2)
|
||||
end function
|
||||
|
@ -35,8 +35,8 @@
|
||||
|
||||
|
||||
elemental function _gfortran_specific__sign_r17 (p1, p2)
|
||||
real (kind=17), intent (in) :: p1, p2
|
||||
real (kind=17) :: _gfortran_specific__sign_r17
|
||||
real (kind=16), intent (in) :: p1, p2
|
||||
real (kind=16) :: _gfortran_specific__sign_r17
|
||||
|
||||
_gfortran_specific__sign_r17 = sign (p1, p2)
|
||||
end function
|
||||
|
@ -33,11 +33,11 @@
|
||||
#include "c99_protos.inc"
|
||||
|
||||
#if defined (HAVE_GFC_COMPLEX_17)
|
||||
#ifdef HAVE_CSIN_17
|
||||
#ifdef HAVE_CSINL
|
||||
|
||||
elemental function _gfortran_specific__sin_c17 (parm)
|
||||
complex (kind=17), intent (in) :: parm
|
||||
complex (kind=17) :: _gfortran_specific__sin_c17
|
||||
complex (kind=16), intent (in) :: parm
|
||||
complex (kind=16) :: _gfortran_specific__sin_c17
|
||||
|
||||
_gfortran_specific__sin_c17 = sin (parm)
|
||||
end function
|
||||
|
@ -33,11 +33,11 @@
|
||||
#include "c99_protos.inc"
|
||||
|
||||
#if defined (HAVE_GFC_REAL_17)
|
||||
#ifdef HAVE_SIN_17
|
||||
#ifdef HAVE_SINL
|
||||
|
||||
elemental function _gfortran_specific__sin_r17 (parm)
|
||||
real (kind=17), intent (in) :: parm
|
||||
real (kind=17) :: _gfortran_specific__sin_r17
|
||||
real (kind=16), intent (in) :: parm
|
||||
real (kind=16) :: _gfortran_specific__sin_r17
|
||||
|
||||
_gfortran_specific__sin_r17 = sin (parm)
|
||||
end function
|
||||
|
@ -33,11 +33,11 @@
|
||||
#include "c99_protos.inc"
|
||||
|
||||
#if defined (HAVE_GFC_REAL_17)
|
||||
#ifdef HAVE_SINH_17
|
||||
#ifdef HAVE_SINHL
|
||||
|
||||
elemental function _gfortran_specific__sinh_r17 (parm)
|
||||
real (kind=17), intent (in) :: parm
|
||||
real (kind=17) :: _gfortran_specific__sinh_r17
|
||||
real (kind=16), intent (in) :: parm
|
||||
real (kind=16) :: _gfortran_specific__sinh_r17
|
||||
|
||||
_gfortran_specific__sinh_r17 = sinh (parm)
|
||||
end function
|
||||
|
@ -33,11 +33,11 @@
|
||||
#include "c99_protos.inc"
|
||||
|
||||
#if defined (HAVE_GFC_COMPLEX_17)
|
||||
#ifdef HAVE_CSQRT_17
|
||||
#ifdef HAVE_CSQRTL
|
||||
|
||||
elemental function _gfortran_specific__sqrt_c17 (parm)
|
||||
complex (kind=17), intent (in) :: parm
|
||||
complex (kind=17) :: _gfortran_specific__sqrt_c17
|
||||
complex (kind=16), intent (in) :: parm
|
||||
complex (kind=16) :: _gfortran_specific__sqrt_c17
|
||||
|
||||
_gfortran_specific__sqrt_c17 = sqrt (parm)
|
||||
end function
|
||||
|
@ -33,11 +33,11 @@
|
||||
#include "c99_protos.inc"
|
||||
|
||||
#if defined (HAVE_GFC_REAL_17)
|
||||
#ifdef HAVE_SQRT_17
|
||||
#ifdef HAVE_SQRTL
|
||||
|
||||
elemental function _gfortran_specific__sqrt_r17 (parm)
|
||||
real (kind=17), intent (in) :: parm
|
||||
real (kind=17) :: _gfortran_specific__sqrt_r17
|
||||
real (kind=16), intent (in) :: parm
|
||||
real (kind=16) :: _gfortran_specific__sqrt_r17
|
||||
|
||||
_gfortran_specific__sqrt_r17 = sqrt (parm)
|
||||
end function
|
||||
|
@ -33,11 +33,11 @@
|
||||
#include "c99_protos.inc"
|
||||
|
||||
#if defined (HAVE_GFC_REAL_17)
|
||||
#ifdef HAVE_TAN_17
|
||||
#ifdef HAVE_TANL
|
||||
|
||||
elemental function _gfortran_specific__tan_r17 (parm)
|
||||
real (kind=17), intent (in) :: parm
|
||||
real (kind=17) :: _gfortran_specific__tan_r17
|
||||
real (kind=16), intent (in) :: parm
|
||||
real (kind=16) :: _gfortran_specific__tan_r17
|
||||
|
||||
_gfortran_specific__tan_r17 = tan (parm)
|
||||
end function
|
||||
|
@ -33,11 +33,11 @@
|
||||
#include "c99_protos.inc"
|
||||
|
||||
#if defined (HAVE_GFC_REAL_17)
|
||||
#ifdef HAVE_TANH_17
|
||||
#ifdef HAVE_TANHL
|
||||
|
||||
elemental function _gfortran_specific__tanh_r17 (parm)
|
||||
real (kind=17), intent (in) :: parm
|
||||
real (kind=17) :: _gfortran_specific__tanh_r17
|
||||
real (kind=16), intent (in) :: parm
|
||||
real (kind=16) :: _gfortran_specific__tanh_r17
|
||||
|
||||
_gfortran_specific__tanh_r17 = tanh (parm)
|
||||
end function
|
||||
|
@ -29,10 +29,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||
# error "Where has __float128 gone?"
|
||||
#endif
|
||||
|
||||
#if defined(__powerpc64__) \
|
||||
&& __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ \
|
||||
&& __SIZEOF_LONG_DOUBLE__ == 16 \
|
||||
&& defined(GFC_REAL_16_IS_LONG_DOUBLE)
|
||||
/* Keep these conditions on one line so grep can filter it out. */
|
||||
#if defined(__powerpc64__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ && __SIZEOF_LONG_DOUBLE__ == 16
|
||||
typedef __float128 GFC_REAL_17;
|
||||
typedef _Complex float __attribute__((mode(KC))) GFC_COMPLEX_17;
|
||||
#define HAVE_GFC_REAL_17
|
||||
|
@ -4,13 +4,28 @@ define(atype_letter,substr(atype_code, 0, 1))dnl
|
||||
define(atype_kind,substr(atype_code, 1))dnl
|
||||
define(get_typename2, `$1 (kind=$2)')dnl
|
||||
define(get_typename, `get_typename2(ifelse($1,i,integer,ifelse($1,r,real,ifelse($1,l,logical,ifelse($1,c,complex,unknown)))),`$2')')dnl
|
||||
define(atype_name, get_typename(atype_letter,atype_kind))dnl
|
||||
dnl
|
||||
dnl KIND=17 is special: This is just a naming convention
|
||||
dnl in the library, for Fortran source code KIND=16 is needed
|
||||
dnl
|
||||
define(name_kind, ifelse(atype_kind,17,16,atype_kind))dnl
|
||||
define(atype_name, get_typename(atype_letter,name_kind))dnl
|
||||
define(name, regexp(regexp(file, `[^/]*$', `\&'), `^_\([^_]*\)_', `\1'))dnl
|
||||
define(rtype_name,get_typename(ifelse(name,abs,ifelse(atype_letter,c,r,atype_letter),ifelse(name,aimag,ifelse(atype_letter,c,r,atype_letter),atype_letter)),atype_kind))dnl
|
||||
define(function_name,ifelse(name,conjg,`_gfortran_specific__conjg_'atype_kind,`_gfortran_specific__'name`_'atype_code))dnl
|
||||
define(rtype_name,get_typename(ifelse(name,abs,ifelse(atype_letter,c,r,atype_letter),ifelse(name,aimag,ifelse(atype_letter,c,r,atype_letter),atype_letter)),name_kind))dnl
|
||||
define(function_name,dnl
|
||||
ifelse(name,conjg,`_gfortran_specific__conjg_'atype_kind,`_gfortran_specific__'name`_'atype_code))dnl
|
||||
|
||||
define(type,ifelse(atype_letter,l,LOGICAL,ifelse(atype_letter,i,INTEGER,ifelse(atype_letter,r,REAL,ifelse(atype_letter,c,COMPLEX,UNKNOW)))))dnl
|
||||
define(Q,ifelse(atype_kind,4,F,ifelse(atype_kind,8,`',ifelse(atype_kind,10,L,ifelse(atype_kind,16,L,`_'atype_kind)))))dnl
|
||||
define(type,dnl
|
||||
ifelse(atype_letter,l,LOGICAL,dnl
|
||||
ifelse(atype_letter,i,INTEGER,dnl
|
||||
ifelse(atype_letter,r,REAL,dnl
|
||||
ifelse(atype_letter,c,COMPLEX,UNKNOW)))))dnl
|
||||
define(Q,ifelse(atype_kind,4,F,
|
||||
ifelse(atype_kind,8,`',
|
||||
ifelse(atype_kind,10,L,
|
||||
ifelse(atype_kind,16,L,
|
||||
ifelse(atype_kind,17,L,
|
||||
`_'atype_kind))))))dnl
|
||||
|
||||
dnl A few specifics require a function other than their name, or
|
||||
dnl nothing. The list is currently:
|
||||
@ -18,7 +33,16 @@ dnl - integer and logical specifics require no libm function
|
||||
dnl - AINT requires the trunc() family functions
|
||||
dnl - ANINT requires round()
|
||||
dnl - AIMAG, CONJG, DIM, SIGN require no libm function
|
||||
define(needed,ifelse(atype_letter,i,`none',ifelse(atype_letter,l,`none',ifelse(name,aint,trunc,ifelse(name,anint,round,ifelse(name,aimag,none,ifelse(name,conjg,none,ifelse(name,dim,none,ifelse(name,sign,none,ifelse(name,abs,fabs,name))))))))))dnl
|
||||
define(needed,dnl
|
||||
ifelse(atype_letter,i,`none',dnl
|
||||
ifelse(atype_letter,l,`none',dnl
|
||||
ifelse(name,aint,trunc,dnl
|
||||
ifelse(name,anint,round,dnl
|
||||
ifelse(name,aimag,none,dnl
|
||||
ifelse(name,conjg,none,dnl
|
||||
ifelse(name,dim,none,dnl
|
||||
ifelse(name,sign,none,dnl
|
||||
ifelse(name,abs,fabs,name))))))))))dnl
|
||||
define(prefix,ifelse(atype_letter,c,C,`'))dnl
|
||||
|
||||
dnl Special case for fabs, for which the corresponding complex function
|
||||
|
@ -4,11 +4,18 @@ define(atype_letter,substr(atype_code, 0, 1))dnl
|
||||
define(atype_kind,substr(atype_code, 1))dnl
|
||||
define(get_typename2, `$1 (kind=$2)')dnl
|
||||
define(get_typename, `get_typename2(ifelse($1,i,integer,ifelse($1,r,real,ifelse($1,l,logical,ifelse($1,c,complex,unknown)))),`$2')')dnl
|
||||
define(atype_name, get_typename(atype_letter,atype_kind))dnl
|
||||
define(name_kind, ifelse(atype_kind,17,16,atype_kind))dnl
|
||||
define(atype_name, get_typename(atype_letter,name_kind))dnl
|
||||
define(name, regexp(regexp(file, `[^/]*$', `\&'), `^_\([^_]*\)_', `\1'))dnl
|
||||
define(function_name,`_gfortran_specific__'name`_'atype_code)dnl
|
||||
|
||||
define(Q,ifelse(atype_kind,4,F,ifelse(atype_kind,8,`',ifelse(atype_kind,10,L,ifelse(atype_kind,16,L,`_'atype_kind)))))dnl
|
||||
define(Q,dnl
|
||||
ifelse(atype_kind,4,F,dnl
|
||||
ifelse(atype_kind,8,`',dnl
|
||||
ifelse(atype_kind,10,L,dnl
|
||||
ifelse(atype_kind,16,L,dnl
|
||||
ifelse(atype_kind,17,L,dnl
|
||||
`_'atype_kind))))))dnl
|
||||
|
||||
#include "config.h"
|
||||
#include "kinds.inc"
|
||||
|
Loading…
Reference in New Issue
Block a user