Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/bouyer-socketcan]: src/lib/libm/softfloat 12371
details: https://anonhg.NetBSD.org/src/rev/2b473ec92ee1
branches: bouyer-socketcan
changeset: 820851:2b473ec92ee1
user: chs <chs%NetBSD.org@localhost>
date: Wed Mar 22 23:11:10 2017 +0000
description:
12371
diffstat:
lib/libm/softfloat/feclearexcept.c | 51 ++++++++++++++++++++++++
lib/libm/softfloat/fedisableexcept.c | 52 +++++++++++++++++++++++++
lib/libm/softfloat/feenableexcept.c | 52 +++++++++++++++++++++++++
lib/libm/softfloat/fegetenv.c | 52 +++++++++++++++++++++++++
lib/libm/softfloat/fegetexcept.c | 49 +++++++++++++++++++++++
lib/libm/softfloat/fegetexceptflag.c | 50 ++++++++++++++++++++++++
lib/libm/softfloat/fegetround.c | 49 +++++++++++++++++++++++
lib/libm/softfloat/feholdexcept.c | 54 ++++++++++++++++++++++++++
lib/libm/softfloat/feraiseexcept.c | 74 ++++++++++++++++++++++++++++++++++++
lib/libm/softfloat/fesetenv.c | 52 +++++++++++++++++++++++++
lib/libm/softfloat/fesetexceptflag.c | 51 ++++++++++++++++++++++++
lib/libm/softfloat/fesetround.c | 50 ++++++++++++++++++++++++
lib/libm/softfloat/fetestexcept.c | 54 ++++++++++++++++++++++++++
lib/libm/softfloat/feupdateenv.c | 57 +++++++++++++++++++++++++++
14 files changed, 747 insertions(+), 0 deletions(-)
diffs (truncated from 803 to 300 lines):
diff -r 897aba9b857a -r 2b473ec92ee1 lib/libm/softfloat/feclearexcept.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libm/softfloat/feclearexcept.c Wed Mar 22 23:11:10 2017 +0000
@@ -0,0 +1,51 @@
+/* $NetBSD: feclearexcept.c,v 1.1.2.2 2017/03/22 23:11:10 chs Exp $ */
+
+/*-
+ * Copyright (c) 2017 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Chuck Silvers.
+ *
+ * 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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.
+ */
+
+#include <sys/cdefs.h>
+__RCSID("$NetBSD: feclearexcept.c,v 1.1.2.2 2017/03/22 23:11:10 chs Exp $");
+
+#include "namespace.h"
+
+#include <fenv.h>
+#include <ieeefp.h>
+
+#ifdef __weak_alias
+__weak_alias(feclearexcept,_feclearexcept)
+#endif
+
+int
+feclearexcept(int excepts)
+{
+ fp_except flags = __FPE(excepts);
+
+ fpsetsticky(fpgetsticky() & ~flags);
+ return 0;
+}
diff -r 897aba9b857a -r 2b473ec92ee1 lib/libm/softfloat/fedisableexcept.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libm/softfloat/fedisableexcept.c Wed Mar 22 23:11:10 2017 +0000
@@ -0,0 +1,52 @@
+/* $NetBSD: fedisableexcept.c,v 1.1.2.2 2017/03/22 23:11:10 chs Exp $ */
+
+/*-
+ * Copyright (c) 2017 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Chuck Silvers.
+ *
+ * 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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.
+ */
+
+#include <sys/cdefs.h>
+__RCSID("$NetBSD: fedisableexcept.c,v 1.1.2.2 2017/03/22 23:11:10 chs Exp $");
+
+#include "namespace.h"
+
+#include <fenv.h>
+#include <ieeefp.h>
+
+#ifdef __weak_alias
+__weak_alias(fedisableexcept,_fedisableexcept)
+#endif
+
+int
+fedisableexcept(int excepts)
+{
+ fp_except omask;
+
+ omask = fpgetmask();
+ fpsetmask(omask & ~__FPE(excepts));
+ return __FEE(omask);
+}
diff -r 897aba9b857a -r 2b473ec92ee1 lib/libm/softfloat/feenableexcept.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libm/softfloat/feenableexcept.c Wed Mar 22 23:11:10 2017 +0000
@@ -0,0 +1,52 @@
+/* $NetBSD: feenableexcept.c,v 1.1.2.2 2017/03/22 23:11:10 chs Exp $ */
+
+/*-
+ * Copyright (c) 2017 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Chuck Silvers.
+ *
+ * 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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.
+ */
+
+#include <sys/cdefs.h>
+__RCSID("$NetBSD: feenableexcept.c,v 1.1.2.2 2017/03/22 23:11:10 chs Exp $");
+
+#include "namespace.h"
+
+#include <fenv.h>
+#include <ieeefp.h>
+
+#ifdef __weak_alias
+__weak_alias(feenableexcept,_feenableexcept)
+#endif
+
+int
+feenableexcept(int excepts)
+{
+ fp_except omask;
+
+ omask = fpgetmask();
+ fpsetmask(omask | __FPE(excepts));
+ return __FEE(omask);
+}
diff -r 897aba9b857a -r 2b473ec92ee1 lib/libm/softfloat/fegetenv.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libm/softfloat/fegetenv.c Wed Mar 22 23:11:10 2017 +0000
@@ -0,0 +1,52 @@
+/* $NetBSD: fegetenv.c,v 1.1.2.2 2017/03/22 23:11:10 chs Exp $ */
+
+/*-
+ * Copyright (c) 2017 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Chuck Silvers.
+ *
+ * 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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.
+ */
+
+#include <sys/cdefs.h>
+__RCSID("$NetBSD: fegetenv.c,v 1.1.2.2 2017/03/22 23:11:10 chs Exp $");
+
+#include "namespace.h"
+
+#include <fenv.h>
+#include <ieeefp.h>
+
+#ifdef __weak_alias
+__weak_alias(fegetenv,_fegetenv)
+#endif
+
+int
+fegetenv(fenv_t *envp)
+{
+
+ __FENV_SET_FLAGS(envp, fpgetsticky());
+ __FENV_SET_MASK(envp, fpgetmask());
+ __FENV_SET_ROUND(envp, fpgetround());
+ return 0;
+}
diff -r 897aba9b857a -r 2b473ec92ee1 lib/libm/softfloat/fegetexcept.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libm/softfloat/fegetexcept.c Wed Mar 22 23:11:10 2017 +0000
@@ -0,0 +1,49 @@
+/* $NetBSD: fegetexcept.c,v 1.1.2.2 2017/03/22 23:11:10 chs Exp $ */
+
+/*-
+ * Copyright (c) 2017 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Chuck Silvers.
+ *
+ * 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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.
+ */
+
+#include <sys/cdefs.h>
+__RCSID("$NetBSD: fegetexcept.c,v 1.1.2.2 2017/03/22 23:11:10 chs Exp $");
+
+#include "namespace.h"
+
+#include <fenv.h>
+#include <ieeefp.h>
+
+#ifdef __weak_alias
+__weak_alias(fegetexcept,_fegetexcept)
+#endif
+
+int
+fegetexcept(void)
+{
+
+ return __FEE(fpgetmask());
+}
diff -r 897aba9b857a -r 2b473ec92ee1 lib/libm/softfloat/fegetexceptflag.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libm/softfloat/fegetexceptflag.c Wed Mar 22 23:11:10 2017 +0000
@@ -0,0 +1,50 @@
+/* $NetBSD: fegetexceptflag.c,v 1.1.2.2 2017/03/22 23:11:10 chs Exp $ */
+
+/*-
+ * Copyright (c) 2017 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Chuck Silvers.
+ *
+ * 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 NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
Home |
Main Index |
Thread Index |
Old Index