Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libm Use "fmadd" to implement fma(3) on ppc.
details: https://anonhg.NetBSD.org/src/rev/c4a741a5560b
branches: trunk
changeset: 367707:c4a741a5560b
user: martin <martin%NetBSD.org@localhost>
date: Thu Jun 23 16:42:50 2022 +0000
description:
Use "fmadd" to implement fma(3) on ppc.
diffstat:
lib/libm/Makefile | 3 ++-
lib/libm/arch/powerpc/s_fma.S | 14 ++++++++++++++
lib/libm/arch/powerpc/s_fmaf.S | 10 ++++++++++
3 files changed, 26 insertions(+), 1 deletions(-)
diffs (49 lines):
diff -r 55da3fe9cf6f -r c4a741a5560b lib/libm/Makefile
--- a/lib/libm/Makefile Thu Jun 23 14:32:16 2022 +0000
+++ b/lib/libm/Makefile Thu Jun 23 16:42:50 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.215 2022/06/23 07:50:14 he Exp $
+# $NetBSD: Makefile,v 1.216 2022/06/23 16:42:50 martin Exp $
#
# @(#)Makefile 5.1beta 93/09/24
#
@@ -195,6 +195,7 @@
COMMON_SRCS += fenv.c
.endif
COMMON_SRCS+= s_fma.c s_fmaf.c s_fmal.c
+ARCH_SRCS += s_fma.S s_fmaf.S
.elif (${LIBC_MACHINE_CPU} == "mips")
.PATH: ${.CURDIR}/arch/mips
diff -r 55da3fe9cf6f -r c4a741a5560b lib/libm/arch/powerpc/s_fma.S
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libm/arch/powerpc/s_fma.S Thu Jun 23 16:42:50 2022 +0000
@@ -0,0 +1,14 @@
+/* $NetBSD: s_fma.S,v 1.1 2022/06/23 16:42:50 martin Exp $ */
+
+/* The contents of this file are in the public domain. */
+
+#include <machine/asm.h>
+
+#ifdef WEAK_ALIAS
+WEAK_ALIAS(fmal, fma)
+#endif
+
+ENTRY(fma)
+ fmadd %f1, %f1, %f2, %f3
+ blr
+END(fma)
diff -r 55da3fe9cf6f -r c4a741a5560b lib/libm/arch/powerpc/s_fmaf.S
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libm/arch/powerpc/s_fmaf.S Thu Jun 23 16:42:50 2022 +0000
@@ -0,0 +1,10 @@
+/* $NetBSD: s_fmaf.S,v 1.1 2022/06/23 16:42:50 martin Exp $ */
+
+/* The contents of this file are in the public domain. */
+
+#include <machine/asm.h>
+
+ENTRY(fmaf)
+ fmadds %f1, %f1, %f2, %f3
+ blr
+END(fmaf)
Home |
Main Index |
Thread Index |
Old Index