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 powerpc.



details:   https://anonhg.NetBSD.org/src/rev/5ae1be1a0ea2
branches:  trunk
changeset: 367698:5ae1be1a0ea2
user:      he <he%NetBSD.org@localhost>
date:      Thu Jun 23 07:50:14 2022 +0000

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

For now this builds the C version, for completeness, so
that e.g. lang/ocaml can be configured & built.  However,
googling reveals that powerpc does have a "fused multiply add"
instruction, ref.
https://www.ibm.com/docs/en/aix/7.1?topic=set-fmadd-fma-floating-multiply-add-instruction
so this could probably be taken advantage of for a more
optimized version.

diffstat:

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

diffs (17 lines):

diff -r 0a754a28ff56 -r 5ae1be1a0ea2 lib/libm/Makefile
--- a/lib/libm/Makefile Thu Jun 23 03:36:00 2022 +0000
+++ b/lib/libm/Makefile Thu Jun 23 07:50:14 2022 +0000
@@ -1,4 +1,4 @@
-#  $NetBSD: Makefile,v 1.214 2021/07/21 12:05:02 tnn Exp $
+#  $NetBSD: Makefile,v 1.215 2022/06/23 07:50:14 he Exp $
 #
 #  @(#)Makefile 5.1beta 93/09/24
 #
@@ -194,6 +194,7 @@
 .if ${MKSOFTFLOAT} == "no"
 COMMON_SRCS += fenv.c
 .endif
+COMMON_SRCS+= s_fma.c s_fmaf.c s_fmal.c
 
 .elif (${LIBC_MACHINE_CPU} == "mips")
 .PATH: ${.CURDIR}/arch/mips



Home | Main Index | Thread Index | Old Index