diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2013-07-03 10:26:50 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2013-07-03 10:26:50 +0000 |
commit | ec2932f691175a43c04cee99373225d090c65ed9 (patch) | |
tree | 205061d03e20ccf2ef43e747c3835abaaab56332 | |
parent | 9bd77dca9257817f592b44a5b05329e8bdc6d0f1 (diff) |
reorganize NOIEEE_SRCS so that files not compiled on vax because
of assembly version are obvious.
Move cproj/cprojf to the PURE club, as the asm support code provides
copysignf
okay martynas@
-rw-r--r-- | lib/libm/Makefile | 22 | ||||
-rw-r--r-- | lib/libm/noieee_src/n_cproj.c | 34 | ||||
-rw-r--r-- | lib/libm/noieee_src/n_cprojf.c | 34 |
3 files changed, 12 insertions, 78 deletions
diff --git a/lib/libm/Makefile b/lib/libm/Makefile index 63f9905c29e..b92a50baed1 100644 --- a/lib/libm/Makefile +++ b/lib/libm/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.102 2013/07/03 04:48:16 espie Exp $ +# $OpenBSD: Makefile,v 1.103 2013/07/03 10:26:49 espie Exp $ # $NetBSD: Makefile,v 1.28 1995/11/20 22:06:19 jtc Exp $ # # @(#)Makefile 5.1beta 93/09/24 @@ -110,7 +110,7 @@ COMMON_SRCS = b_exp__D.c b_log__D.c b_tgamma.c \ s_ccoshf.c s_ceil.c \ s_ceilf.c s_cexpf.c s_clogf.c \ s_copysign.c s_copysignf.c s_cos.c s_cosf.c s_cpowf.c \ - s_cproj.c s_cprojf.c s_csinf.c \ + s_csinf.c \ s_csinhf.c s_csqrtf.c s_ctanf.c \ s_ctanhf.c s_erf.c s_erff.c s_exp2.c s_exp2f.c s_expm1.c s_expm1f.c \ s_fabsf.c s_fma.c s_fmaf.c \ @@ -143,22 +143,24 @@ LONG_SRCS = e_acoshl.c e_acosl.c e_asinl.c e_atan2l.c e_atanhl.c \ s_tanhl.c s_tanl.c s_truncl.c # math routines for non-IEEE architectures. -NOIEEE_SRCS = n_acosh.c n_argred.c n_asincos.c n_asinh.c n_atan.c \ - n_atan2.c n_atanh.c n_cbrt.c \ - n_cosh.c n_cproj.c n_cprojf.c \ +NOIEEE_SRCS = n_acosh.c n_asincos.c n_asinh.c n_atan.c \ + n_atanh.c n_cosh.c \ n_erf.c n_exp.c n_exp__E.c n_expm1.c n_floor.c \ - n_fmod.c n_hypot.c \ - n_infnan.c n_j0.c n_j1.c n_jn.c n_lgamma.c n_log.c n_log10.c \ + n_fmod.c \ + n_j0.c n_j1.c n_jn.c n_lgamma.c n_log.c n_log10.c \ n_log1p.c n_log__L.c n_nan.c n_pow.c n_round.c n_scalbln.c \ - n_sincos.c n_sinh.c n_sqrt.c n_support.c n_tan.c n_tanh.c \ - n_tgamma.c + n_sinh.c n_tanh.c n_tgamma.c +# there for reference, they're replaced by an asm version on vax +NOIEEE_SRCS += n_argred.c n_atan2.c n_cbrt.c n_hypot.c n_infnan.c \ + n_sincos.c n_sqrt.c n_support.c n_tan.c # math routines that are completely MI PURE_SRCS = s_cabs.c s_cacos.c s_cacosh.c s_carg.c s_casin.c \ s_casinh.c s_catan.c s_catanh.c s_ccos.c s_ccosh.c s_cexp.c \ s_cimag.c s_cimagf.c s_clog.c s_conj.c s_conjf.c s_cpow.c \ s_creal.c s_crealf.c s_csin.c s_csinh.c s_csqrt.c s_ctan.c \ - s_ctanh.c s_fdim.c s_fmax.c s_fmaxf.c s_fmin.c s_fminf.c + s_ctanh.c s_fdim.c s_fmax.c s_fmaxf.c s_fmin.c s_fminf.c \ + s_cproj.c s_cprojf.c .if (${MACHINE_ARCH} == "vax") SRCS= ${NOIEEE_SRCS} ${NOIEEE_ARCH} ${PURE_SRCS} diff --git a/lib/libm/noieee_src/n_cproj.c b/lib/libm/noieee_src/n_cproj.c deleted file mode 100644 index b177b35ae89..00000000000 --- a/lib/libm/noieee_src/n_cproj.c +++ /dev/null @@ -1,34 +0,0 @@ -/* $OpenBSD: n_cproj.c,v 1.2 2010/07/19 00:04:07 guenther Exp $ */ -/* - * Copyright (c) 2008 Martynas Venckus <martynas@openbsd.org> - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include <complex.h> -#include <math.h> - -double complex -cproj(double complex z) -{ - double complex res; - - if (isinf(__real__ z) || isinf(__imag__ z)) { - __real__ res = INFINITY; - __imag__ res = copysign(0.0, __imag__ z); - } else { - res = z; - } - - return res; -} diff --git a/lib/libm/noieee_src/n_cprojf.c b/lib/libm/noieee_src/n_cprojf.c deleted file mode 100644 index 3b948e821f1..00000000000 --- a/lib/libm/noieee_src/n_cprojf.c +++ /dev/null @@ -1,34 +0,0 @@ -/* $OpenBSD: n_cprojf.c,v 1.2 2010/07/19 00:04:07 guenther Exp $ */ -/* - * Copyright (c) 2008 Martynas Venckus <martynas@openbsd.org> - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include <complex.h> -#include <math.h> - -float complex -cprojf(float complex z) -{ - float complex res; - - if (isinf(__real__ z) || isinf(__imag__ z)) { - __real__ res = INFINITY; - __imag__ res = copysign(0.0, __imag__ z); - } else { - res = z; - } - - return res; -} |