diff options
Diffstat (limited to 'sysdeps/aarch64/fpu/s_fma.c')
-rw-r--r-- | sysdeps/aarch64/fpu/s_fma.c | 29 |
1 files changed, 6 insertions, 23 deletions
diff --git a/sysdeps/aarch64/fpu/s_fma.c b/sysdeps/aarch64/fpu/s_fma.c index 3320ba6989..4f3d6c4a51 100644 --- a/sysdeps/aarch64/fpu/s_fma.c +++ b/sysdeps/aarch64/fpu/s_fma.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2016 Free Software Foundation, Inc. +/* Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -17,29 +17,12 @@ <http://www.gnu.org/licenses/>. */ #include <math.h> +#include <libm-alias-double.h> -#ifndef FUNC -# define FUNC fma -#endif - -#ifndef TYPE -# define TYPE double -# define REGS "d" -#else -# ifndef REGS -# error REGS not defined -# endif -#endif - -#define __CONCATX(a,b) __CONCAT(a,b) - -TYPE -__CONCATX(__,FUNC) (TYPE x, TYPE y, TYPE z) +double +__fma (double x, double y, double z) { - TYPE result; - asm ( "fmadd" "\t%" REGS "0, %" REGS "1, %" REGS "2, %" REGS "3" - : "=w" (result) : "w" (x), "w" (y), "w" (z) ); - return result; + return __builtin_fma (x, y, z); } -weak_alias (__CONCATX(__,FUNC), FUNC) +libm_alias_double (__fma, fma) |