Module Name: src
Committed By: riastradh
Date: Sun May 5 02:50:11 UTC 2024
Modified Files:
src: UPDATING
src/lib/libm: Makefile
Added Files:
src/lib/libm/arch/i387: s_rintl.S
Log Message:
libm: New s_rintl.S for x86.
Prompted by PR lib/58054.
To generate a diff of this commit:
cvs rdiff -u -r1.349 -r1.350 src/UPDATING
cvs rdiff -u -r1.227 -r1.228 src/lib/libm/Makefile
cvs rdiff -u -r0 -r1.1 src/lib/libm/arch/i387/s_rintl.S
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/UPDATING
diff -u src/UPDATING:1.349 src/UPDATING:1.350
--- src/UPDATING:1.349 Tue Apr 23 03:25:39 2024
+++ src/UPDATING Sun May 5 02:50:11 2024
@@ -1,4 +1,4 @@
-$NetBSD: UPDATING,v 1.349 2024/04/23 03:25:39 maya Exp $
+$NetBSD: UPDATING,v 1.350 2024/05/05 02:50:11 riastradh Exp $
This file (UPDATING) is intended to be a brief reference to recent
changes that might cause problems in the build process, and a guide for
@@ -19,6 +19,10 @@ See also: BUILDING, build.sh, Makefile.
Recent changes:
^^^^^^^^^^^^^^^
+20240504:
+ Update builds on x86 require making the `cleandir' target in
+ lib/libm, or deleting the objdir for lib/libm.
+
20240423:
Update builds with x11 may fail after switching to Mesa 21.
Index: src/lib/libm/Makefile
diff -u src/lib/libm/Makefile:1.227 src/lib/libm/Makefile:1.228
--- src/lib/libm/Makefile:1.227 Tue Mar 26 20:12:47 2024
+++ src/lib/libm/Makefile Sun May 5 02:50:11 2024
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.227 2024/03/26 20:12:47 rillig Exp $
+# $NetBSD: Makefile,v 1.228 2024/05/05 02:50:11 riastradh Exp $
#
# @(#)Makefile 5.1beta 93/09/24
#
@@ -131,8 +131,10 @@ ARCH_SRCS = e_acos.S e_asin.S e_atan2.S
s_atanf.S s_ceil.S s_ceilf.S s_copysign.S s_copysignf.S \
s_finite.S s_finitef.S s_floor.S s_floorf.S \
s_log1p.S s_log1pf.S s_logb.S s_logbf.S s_logbl.S \
- s_rint.S s_rintf.S s_scalbn.S s_scalbnf.S s_significand.S \
- s_significandf.S lrint.S
+ s_rint.S s_rintf.S s_rintl.S \
+ s_scalbn.S s_scalbnf.S \
+ s_significand.S s_significandf.S \
+ lrint.S
# do not pick up the i387 asm version for the following functions;
# it is incorrect
.for f in cos cosf modf ilogb ilogbl ilogbf sin sinf tan tanf
Added files:
Index: src/lib/libm/arch/i387/s_rintl.S
diff -u /dev/null src/lib/libm/arch/i387/s_rintl.S:1.1
--- /dev/null Sun May 5 02:50:11 2024
+++ src/lib/libm/arch/i387/s_rintl.S Sun May 5 02:50:11 2024
@@ -0,0 +1,39 @@
+/* $NetBSD: s_rintl.S,v 1.1 2024/05/05 02:50:11 riastradh Exp $ */
+
+/*-
+ * Copyright (c) 2024 The NetBSD Foundation, Inc.
+ * 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 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 <machine/asm.h>
+
+#include "abi.h"
+
+RCSID("$NetBSD: s_rintl.S,v 1.1 2024/05/05 02:50:11 riastradh Exp $")
+
+ENTRY(rintl)
+ fldt ARG_LONG_DOUBLE_ONE
+ frndint
+ ret
+END(rintl)