diff options
Diffstat (limited to 'sysdeps/aarch64/fpu/s_fma.c')
-rw-r--r-- | sysdeps/aarch64/fpu/s_fma.c | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/sysdeps/aarch64/fpu/s_fma.c b/sysdeps/aarch64/fpu/s_fma.c index 6f62ce2..e496ec6 100644 --- a/sysdeps/aarch64/fpu/s_fma.c +++ b/sysdeps/aarch64/fpu/s_fma.c @@ -18,28 +18,10 @@ #include <math.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) +weak_alias (__fma, fma) |