Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libm libm: build fma(3), fmaf(3), fmal(3) on alpha



details:   https://anonhg.NetBSD.org/src/rev/385993808771
branches:  trunk
changeset: 984755:385993808771
user:      tnn <tnn%NetBSD.org@localhost>
date:      Wed Jul 21 12:05:02 2021 +0000

description:
libm: build fma(3), fmaf(3), fmal(3) on alpha

Alpha has no hardware-assisted fused multiply-add, so the fallback
C implementation must be used. A basic smoke test shows the
implementation works for
"x * x - 1.0f" vs "fmaf(x, x, -1.0f)" with "volatile float x = 1.0008f;"

diffstat:

 lib/libm/Makefile |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (17 lines):

diff -r 54192c40c212 -r 385993808771 lib/libm/Makefile
--- a/lib/libm/Makefile Wed Jul 21 07:39:58 2021 +0000
+++ b/lib/libm/Makefile Wed Jul 21 12:05:02 2021 +0000
@@ -1,4 +1,4 @@
-#  $NetBSD: Makefile,v 1.213 2021/04/25 23:43:20 christos Exp $
+#  $NetBSD: Makefile,v 1.214 2021/07/21 12:05:02 tnn Exp $
 #
 #  @(#)Makefile 5.1beta 93/09/24
 #
@@ -71,6 +71,7 @@
 .PATH: ${.CURDIR}/arch/alpha
 ARCH_SRCS = s_copysign.S s_copysignf.S lrint.S
 COMMON_SRCS+= fenv.c
+COMMON_SRCS+= s_fma.c s_fmaf.c s_fmal.c
 COPTS+=        -mfloat-ieee -mieee-with-inexact -mfp-trap-mode=sui -mtrap-precision=i
 
 .elif (${LIBC_MACHINE_CPU} == "arm")



Home | Main Index | Thread Index | Old Index