Use "fmadd" to implement fma(3) on ppc.

This commit is contained in:
martin 2022-06-23 16:42:50 +00:00
parent f49fecdb76
commit 35a4c156a5
3 changed files with 26 additions and 1 deletions

View File

@ -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

View File

@ -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)

View File

@ -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)