diff options
author | Paul E. Murphy <murphyp@linux.vnet.ibm.com> | 2016-06-28 08:49:23 -0500 |
---|---|---|
committer | Paul E. Murphy <murphyp@linux.vnet.ibm.com> | 2016-08-19 16:46:41 -0500 |
commit | c50eee19c447d3f2c182dc3a22f2b01a053dca41 (patch) | |
tree | 3b5f0d5c832bad20fce31502026f27fd6915ea8f /sysdeps/m68k/m680x0 | |
parent | ffb84f5e197aaa9d46a35df84689c75d689d73cb (diff) | |
download | glibc-c50eee19c447d3f2c182dc3a22f2b01a053dca41.tar.gz glibc-c50eee19c447d3f2c182dc3a22f2b01a053dca41.tar.xz glibc-c50eee19c447d3f2c182dc3a22f2b01a053dca41.zip |
Convert _Complex sine functions to generated code
Refactor s_c{,a}sin{,h}{f,,l} into a single templated macro.
Diffstat (limited to 'sysdeps/m68k/m680x0')
-rw-r--r-- | sysdeps/m68k/m680x0/fpu/s_csin_template.c (renamed from sysdeps/m68k/m680x0/fpu/s_csin.c) | 18 | ||||
-rw-r--r-- | sysdeps/m68k/m680x0/fpu/s_csinf.c | 3 | ||||
-rw-r--r-- | sysdeps/m68k/m680x0/fpu/s_csinh_template.c (renamed from sysdeps/m68k/m680x0/fpu/s_csinh.c) | 17 | ||||
-rw-r--r-- | sysdeps/m68k/m680x0/fpu/s_csinhf.c | 3 | ||||
-rw-r--r-- | sysdeps/m68k/m680x0/fpu/s_csinhl.c | 3 | ||||
-rw-r--r-- | sysdeps/m68k/m680x0/fpu/s_csinl.c | 3 |
6 files changed, 10 insertions, 37 deletions
diff --git a/sysdeps/m68k/m680x0/fpu/s_csin.c b/sysdeps/m68k/m680x0/fpu/s_csin_template.c index b8419be897..628d0d519b 100644 --- a/sysdeps/m68k/m680x0/fpu/s_csin.c +++ b/sysdeps/m68k/m680x0/fpu/s_csin_template.c @@ -21,27 +21,19 @@ #include <math.h> #include "mathimpl.h" -#ifndef SUFF -#define SUFF -#endif -#ifndef float_type -#define float_type double -#endif - -#define CONCATX(a,b) __CONCAT(a,b) -#define s(name) CONCATX(name,SUFF) +#define s(name) M_SUF (name) #define m81(func) __m81_u(s(func)) -__complex__ float_type -s(__csin) (__complex__ float_type x) +CFLOAT +s(__csin) (CFLOAT x) { - __complex__ float_type retval; + CFLOAT retval; unsigned long rx_cond = __m81_test (__real__ x); if ((rx_cond & (__M81_COND_INF|__M81_COND_NAN)) == 0) { /* Real part is finite. */ - float_type sin_rx, cos_rx; + FLOAT sin_rx, cos_rx; __asm ("fsincos%.x %2,%1:%0" : "=f" (sin_rx), "=f" (cos_rx) : "f" (__real__ x)); diff --git a/sysdeps/m68k/m680x0/fpu/s_csinf.c b/sysdeps/m68k/m680x0/fpu/s_csinf.c deleted file mode 100644 index b760e192c3..0000000000 --- a/sysdeps/m68k/m680x0/fpu/s_csinf.c +++ /dev/null @@ -1,3 +0,0 @@ -#define SUFF f -#define float_type float -#include <s_csin.c> diff --git a/sysdeps/m68k/m680x0/fpu/s_csinh.c b/sysdeps/m68k/m680x0/fpu/s_csinh_template.c index c633cd8875..56f3babd95 100644 --- a/sysdeps/m68k/m680x0/fpu/s_csinh.c +++ b/sysdeps/m68k/m680x0/fpu/s_csinh_template.c @@ -21,21 +21,14 @@ #include <math.h> #include "mathimpl.h" -#ifndef SUFF -#define SUFF -#endif -#ifndef float_type -#define float_type double -#endif - #define CONCATX(a,b) __CONCAT(a,b) -#define s(name) CONCATX(name,SUFF) +#define s(name) M_SUF (name) #define m81(func) __m81_u(s(func)) -__complex__ float_type -s(__csinh) (__complex__ float_type x) +CFLOAT +s(__csinh) (CFLOAT x) { - __complex__ float_type retval; + CFLOAT retval; unsigned long ix_cond; ix_cond = __m81_test (__imag__ x); @@ -43,7 +36,7 @@ s(__csinh) (__complex__ float_type x) if ((ix_cond & (__M81_COND_INF|__M81_COND_NAN)) == 0) { /* Imaginary part is finite. */ - float_type sin_ix, cos_ix; + FLOAT sin_ix, cos_ix; __asm ("fsincos%.x %2,%1:%0" : "=f" (sin_ix), "=f" (cos_ix) : "f" (__imag__ x)); diff --git a/sysdeps/m68k/m680x0/fpu/s_csinhf.c b/sysdeps/m68k/m680x0/fpu/s_csinhf.c deleted file mode 100644 index 2f7a43e6a8..0000000000 --- a/sysdeps/m68k/m680x0/fpu/s_csinhf.c +++ /dev/null @@ -1,3 +0,0 @@ -#define SUFF f -#define float_type float -#include <s_csinh.c> diff --git a/sysdeps/m68k/m680x0/fpu/s_csinhl.c b/sysdeps/m68k/m680x0/fpu/s_csinhl.c deleted file mode 100644 index 026a20e7be..0000000000 --- a/sysdeps/m68k/m680x0/fpu/s_csinhl.c +++ /dev/null @@ -1,3 +0,0 @@ -#define SUFF l -#define float_type long double -#include <s_csinh.c> diff --git a/sysdeps/m68k/m680x0/fpu/s_csinl.c b/sysdeps/m68k/m680x0/fpu/s_csinl.c deleted file mode 100644 index ea2dad0556..0000000000 --- a/sysdeps/m68k/m680x0/fpu/s_csinl.c +++ /dev/null @@ -1,3 +0,0 @@ -#define SUFF l -#define float_type long double -#include <s_csin.c> |