diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/arch/m88k/gdtoa/Makefile.inc | 4 | ||||
-rw-r--r-- | lib/libc/arch/m88k/gdtoa/strtold.c | 45 | ||||
-rw-r--r-- | lib/libc/arch/m88k/gen/Makefile.inc | 3 | ||||
-rw-r--r-- | lib/libc/arch/m88k/gen/fpclassifyl.c | 44 | ||||
-rw-r--r-- | lib/libc/arch/m88k/gen/isfinitel.c | 28 | ||||
-rw-r--r-- | lib/libc/arch/m88k/gen/isinfl.c | 31 | ||||
-rw-r--r-- | lib/libc/arch/m88k/gen/isnanl.c | 31 | ||||
-rw-r--r-- | lib/libc/arch/m88k/gen/isnormall.c | 28 | ||||
-rw-r--r-- | lib/libc/arch/m88k/gen/signbitl.c | 28 |
9 files changed, 3 insertions, 239 deletions
diff --git a/lib/libc/arch/m88k/gdtoa/Makefile.inc b/lib/libc/arch/m88k/gdtoa/Makefile.inc index 9b47fc51d00..ab192cc494f 100644 --- a/lib/libc/arch/m88k/gdtoa/Makefile.inc +++ b/lib/libc/arch/m88k/gdtoa/Makefile.inc @@ -1,3 +1,3 @@ -# $OpenBSD: Makefile.inc,v 1.1 2008/09/07 20:36:07 martynas Exp $ +# $OpenBSD: Makefile.inc,v 1.2 2012/09/15 15:06:09 martynas Exp $ -SRCS+= strtord.c strtorx.c +SRCS+= strtord.c diff --git a/lib/libc/arch/m88k/gdtoa/strtold.c b/lib/libc/arch/m88k/gdtoa/strtold.c deleted file mode 100644 index 20b50655348..00000000000 --- a/lib/libc/arch/m88k/gdtoa/strtold.c +++ /dev/null @@ -1,45 +0,0 @@ -/* $OpenBSD: strtold.c,v 1.1 2008/09/07 20:36:07 martynas Exp $ */ -/*- - * Copyright (c) 2003 David Schultz <das@FreeBSD.ORG> - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -/* - * Machine-dependent glue to integrate David Gay's gdtoa - * package into libc for architectures where a long double - * is an IEEE extended precision number. - */ - -#include <float.h> - -#include "gdtoaimp.h" - -long double -strtold(const char * __restrict s, char ** __restrict sp) -{ - long double result; - - strtorx(s, sp, FLT_ROUNDS, &result); - return result; -} diff --git a/lib/libc/arch/m88k/gen/Makefile.inc b/lib/libc/arch/m88k/gen/Makefile.inc index b721ce24563..3bc3b352968 100644 --- a/lib/libc/arch/m88k/gen/Makefile.inc +++ b/lib/libc/arch/m88k/gen/Makefile.inc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.inc,v 1.13 2012/04/12 16:14:09 deraadt Exp $ +# $OpenBSD: Makefile.inc,v 1.14 2012/09/15 15:06:09 martynas Exp $ # $NetBSD: Makefile.inc,v 1.3 1995/04/10 21:09:06 jtc Exp $ #SRCS+= _setjmp.S fabs.S infinity.c ldexp.c modf.c nan.c @@ -9,5 +9,4 @@ SRCS+= _setjmp.S fabs.S infinity.c ldexp.c modf.c nan.c SRCS+= flt_rounds.c fpgetmask.c fpgetround.c fpgetsticky.c fpsetmask.c \ fpsetround.c fpsetsticky.c -SRCS+= fpclassifyl.c isfinitel.c isinfl.c isnanl.c isnormall.c signbitl.c SRCS+= setjmp.S sigsetjmp.S diff --git a/lib/libc/arch/m88k/gen/fpclassifyl.c b/lib/libc/arch/m88k/gen/fpclassifyl.c deleted file mode 100644 index 19940cdd53d..00000000000 --- a/lib/libc/arch/m88k/gen/fpclassifyl.c +++ /dev/null @@ -1,44 +0,0 @@ -/* $OpenBSD: fpclassifyl.c,v 1.1 2008/09/07 20:36:07 martynas 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 <sys/types.h> -#include <machine/ieee.h> -#include <math.h> - -int -__fpclassifyl(long double e) -{ - struct ieee_ext *p = (struct ieee_ext *)&e; - - if (p->ext_exp == 0) { - if (p->ext_frach == 0 && p->ext_fracl == 0) - return FP_ZERO; - else - return FP_SUBNORMAL; - } - - p->ext_frach &= ~0x80000000; /* clear normalization bit */ - - if (p->ext_exp == EXT_EXP_INFNAN) { - if (p->ext_frach == 0 && p->ext_fracl == 0) - return FP_INFINITE; - else - return FP_NAN; - } - - return FP_NORMAL; -} diff --git a/lib/libc/arch/m88k/gen/isfinitel.c b/lib/libc/arch/m88k/gen/isfinitel.c deleted file mode 100644 index 02a5602ea84..00000000000 --- a/lib/libc/arch/m88k/gen/isfinitel.c +++ /dev/null @@ -1,28 +0,0 @@ -/* $OpenBSD: isfinitel.c,v 1.2 2008/12/09 19:52:33 martynas 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 <sys/types.h> -#include <machine/ieee.h> -#include <math.h> - -int -__isfinitel(long double e) -{ - struct ieee_ext *p = (struct ieee_ext *)&e; - - return (p->ext_exp != EXT_EXP_INFNAN); -} diff --git a/lib/libc/arch/m88k/gen/isinfl.c b/lib/libc/arch/m88k/gen/isinfl.c deleted file mode 100644 index eab84e50759..00000000000 --- a/lib/libc/arch/m88k/gen/isinfl.c +++ /dev/null @@ -1,31 +0,0 @@ -/* $OpenBSD: isinfl.c,v 1.2 2008/12/09 19:52:33 martynas 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 <sys/types.h> -#include <machine/ieee.h> -#include <math.h> - -int -__isinfl(long double e) -{ - struct ieee_ext *p = (struct ieee_ext *)&e; - - p->ext_frach &= ~0x80000000; /* clear normalization bit */ - - return (p->ext_exp == EXT_EXP_INFNAN && - p->ext_frach == 0 && p->ext_fracl == 0); -} diff --git a/lib/libc/arch/m88k/gen/isnanl.c b/lib/libc/arch/m88k/gen/isnanl.c deleted file mode 100644 index 0fbecf2efcc..00000000000 --- a/lib/libc/arch/m88k/gen/isnanl.c +++ /dev/null @@ -1,31 +0,0 @@ -/* $OpenBSD: isnanl.c,v 1.2 2008/12/09 19:52:33 martynas 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 <sys/types.h> -#include <machine/ieee.h> -#include <math.h> - -int -__isnanl(long double e) -{ - struct ieee_ext *p = (struct ieee_ext *)&e; - - p->ext_frach &= ~0x80000000; /* clear normalization bit */ - - return (p->ext_exp == EXT_EXP_INFNAN && - (p->ext_frach != 0 || p->ext_fracl != 0)); -} diff --git a/lib/libc/arch/m88k/gen/isnormall.c b/lib/libc/arch/m88k/gen/isnormall.c deleted file mode 100644 index 97ce382671b..00000000000 --- a/lib/libc/arch/m88k/gen/isnormall.c +++ /dev/null @@ -1,28 +0,0 @@ -/* $OpenBSD: isnormall.c,v 1.2 2008/12/09 19:52:33 martynas 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 <sys/types.h> -#include <machine/ieee.h> -#include <math.h> - -int -__isnormall(long double e) -{ - struct ieee_ext *p = (struct ieee_ext *)&e; - - return (p->ext_exp != 0 && p->ext_exp != EXT_EXP_INFNAN); -} diff --git a/lib/libc/arch/m88k/gen/signbitl.c b/lib/libc/arch/m88k/gen/signbitl.c deleted file mode 100644 index 1f9f7ab332d..00000000000 --- a/lib/libc/arch/m88k/gen/signbitl.c +++ /dev/null @@ -1,28 +0,0 @@ -/* $OpenBSD: signbitl.c,v 1.1 2008/12/09 19:52:33 martynas 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 <sys/types.h> -#include <machine/ieee.h> -#include <math.h> - -int -__signbitl(long double e) -{ - struct ieee_ext *p = (struct ieee_ext *)&e; - - return p->ext_sign; -} |