diff --git a/libgfortran/intrinsics/trigd.c b/libgfortran/intrinsics/trigd.c index 2fed8b25e44..5268916a91b 100644 --- a/libgfortran/intrinsics/trigd.c +++ b/libgfortran/intrinsics/trigd.c @@ -313,6 +313,16 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #define HAVE_INFINITY_KIND #endif +#ifdef POWER_IEEE128 +#define COPYSIGN __copysignieee128 +#define FMOD __fmodieee128 +#define FABS __fabsieee128 +#define FMA __fmaieee128 +#define SIN __sinieee128 +#define COS __cosieee128 +#define TAN __tanieee128 +#endif + #include "trigd_lib.inc" #undef KIND diff --git a/libgfortran/intrinsics/trigd_lib.inc b/libgfortran/intrinsics/trigd_lib.inc index 000e187e49a..aea85ec84fd 100644 --- a/libgfortran/intrinsics/trigd_lib.inc +++ b/libgfortran/intrinsics/trigd_lib.inc @@ -65,6 +65,7 @@ PIO180L -- lower bits of pi/180 for FMA #define CONCAT(x,y) x ## y #define CONCAT_EXPAND(x,y) CONCAT(x,y) +#ifndef COPYSIGN #define COPYSIGN LITERAL(copysign) #define FMOD LITERAL(fmod) #define FABS LITERAL(fabs) @@ -72,6 +73,7 @@ PIO180L -- lower bits of pi/180 for FMA #define SIN LITERAL(sin) #define COS LITERAL(cos) #define TAN LITERAL(tan) +#endif #ifdef TINY #define TINY_LITERAL LITERAL(TINY) diff --git a/libgfortran/libgfortran.h b/libgfortran/libgfortran.h index dc7a5f13921..2aec78fc401 100644 --- a/libgfortran/libgfortran.h +++ b/libgfortran/libgfortran.h @@ -1968,6 +1968,8 @@ extern __float128 __atanhieee128 (__float128) __attribute__ ((__nothrow__, __leaf__)); extern __float128 __atanieee128 (__float128) __attribute__ ((__nothrow__, __leaf__)); +extern __float128 __copysignieee128 (__float128, __float128) + __attribute__ ((__nothrow__, __leaf__)); extern __float128 __coshieee128 (__float128) __attribute__ ((__nothrow__, __leaf__)); extern __float128 __cosieee128 (__float128) @@ -1980,6 +1982,10 @@ extern __float128 __expieee128 (__float128) __attribute__ ((__nothrow__, __leaf__)); extern __float128 __fabsieee128 (__float128) __attribute__ ((__nothrow__, __leaf__)); +extern __float128 __fmaieee128 (__float128, __float128, __float128) + __attribute__ ((__nothrow__, __leaf__)); +extern __float128 __fmodieee128 (__float128, __float128) + __attribute__ ((__nothrow__, __leaf__)); extern __float128 __jnieee128 (int, __float128) __attribute__ ((__nothrow__, __leaf__)); extern __float128 __log10ieee128 (__float128)