]> sourceware.org Git - glibc.git/commitdiff
Clean up FMA use
authorUlrich Drepper <drepper@gmail.com>
Sun, 23 Oct 2011 17:31:01 +0000 (13:31 -0400)
committerUlrich Drepper <drepper@gmail.com>
Sun, 23 Oct 2011 17:31:01 +0000 (13:31 -0400)
The macro's name should reflect that subtraction is being done.  And
use __builtin_fma, it seems to work after all.

sysdeps/ieee754/dbl-64/dla.h
sysdeps/x86_64/dla.h

index af202ad7a71528b086f04a75686fd6e1a6d82456..cb12dbc8fb8996c102123af5bd86550f6962b53f 100644 (file)
@@ -60,9 +60,9 @@
 /* satisfies z+zz = x*y exactly. p,hx,tx,hy,ty are temporary           */
 /* storage variables of type double.                                   */
 
-#ifdef DLA_FMA
+#ifdef DLA_FMS
 # define  EMULV(x,y,z,zz,p,hx,tx,hy,ty)          \
-          z=x*y; zz=DLA_FMA(x,y,z);
+          z=x*y; zz=DLA_FMS(x,y,z);
 #else
 # define  EMULV(x,y,z,zz,p,hx,tx,hy,ty)          \
           p=CN*(x);  hx=((x)-p)+p;  tx=(x)-hx; \
@@ -76,7 +76,7 @@
 /* that satisfies z+zz = x*y exactly. p,hx,tx,hy,ty,q are temporary          */
 /* storage variables of type double.                                         */
 
-#ifdef DLA_FMA
+#ifdef DLA_FMS
 # define  MUL12(x,y,z,zz,p,hx,tx,hy,ty,q)        \
           EMULV(x,y,z,zz,p,hx,tx,hy,ty)
 #else
index bb6c8c4be08588fb6adbf0d64f12a1bf0e600dd3..7aa06e5f6f0107c1ed43758d53848ed52078b405 100644 (file)
@@ -1,9 +1,6 @@
-#ifdef __FMA4__
-# define DLA_FMA(x,y,z) \
-          ({ double __zz; \
-             asm ("vfmsubsd %3, %2, %1, %0"                                  \
-                  : "=x" (__zz) : "x" (x), "xm" (y), "x" (z));               \
-             __zz; })
+#if defined __FMA4__ || defined __FMA__
+# define DLA_FMS(x,y,z) \
+  __builtin_fma (x, y, -z)
 #endif
 
 #include "sysdeps/ieee754/dbl-64/dla.h"
This page took 0.050032 seconds and 5 git commands to generate.