Module Name: src Committed By: martin Date: Thu Jun 23 16:42:50 UTC 2022
Modified Files: src/lib/libm: Makefile Added Files: src/lib/libm/arch/powerpc: s_fma.S s_fmaf.S Log Message: Use "fmadd" to implement fma(3) on ppc. To generate a diff of this commit: cvs rdiff -u -r1.215 -r1.216 src/lib/libm/Makefile cvs rdiff -u -r0 -r1.1 src/lib/libm/arch/powerpc/s_fma.S \ src/lib/libm/arch/powerpc/s_fmaf.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/libm/Makefile diff -u src/lib/libm/Makefile:1.215 src/lib/libm/Makefile:1.216 --- src/lib/libm/Makefile:1.215 Thu Jun 23 07:50:14 2022 +++ src/lib/libm/Makefile Thu Jun 23 16:42:50 2022 @@ -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 @@ ARCH_SRCS += s_fmin.S s_fminf.S 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 Added files: Index: src/lib/libm/arch/powerpc/s_fma.S diff -u /dev/null src/lib/libm/arch/powerpc/s_fma.S:1.1 --- /dev/null Thu Jun 23 16:42:50 2022 +++ src/lib/libm/arch/powerpc/s_fma.S Thu Jun 23 16:42:50 2022 @@ -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) Index: src/lib/libm/arch/powerpc/s_fmaf.S diff -u /dev/null src/lib/libm/arch/powerpc/s_fmaf.S:1.1 --- /dev/null Thu Jun 23 16:42:50 2022 +++ src/lib/libm/arch/powerpc/s_fmaf.S Thu Jun 23 16:42:50 2022 @@ -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)