about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@gmail.com>2011-10-24 21:17:10 -0400
committerUlrich Drepper <drepper@gmail.com>2011-10-24 21:17:10 -0400
commita0cf1edd4cf2b3bf1ec2f772b47c8eaafd899383 (patch)
tree5d2d03ffdd10f0c59f64cb5ed7222081f5d91b83 /sysdeps
parentaf968f62f24c5c0ef4e7e5ab41acae946908c112 (diff)
downloadglibc-a0cf1edd4cf2b3bf1ec2f772b47c8eaafd899383.tar.gz
glibc-a0cf1edd4cf2b3bf1ec2f772b47c8eaafd899383.tar.xz
glibc-a0cf1edd4cf2b3bf1ec2f772b47c8eaafd899383.zip
Use inline asm for DLA_FMS because of broken old compilers
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/x86_64/dla.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/sysdeps/x86_64/dla.h b/sysdeps/x86_64/dla.h
index 7aa06e5f6f..6fe8f740f3 100644
--- a/sysdeps/x86_64/dla.h
+++ b/sysdeps/x86_64/dla.h
@@ -1,6 +1,10 @@
-#if defined __FMA4__ || defined __FMA__
+#ifdef __FMA4__
 # define DLA_FMS(x,y,z) \
-  __builtin_fma (x, y, -z)
+  ({ double __z;							      \
+     asm ("vfmsubsd %3, %2, %1, %0"					      \
+	  : "=x" (__z)							      \
+	  : "x" ((double) (x)), "xm" ((double) (y)) , "x" ((double) (z)));    \
+    __z; })
 #endif
 
 #include "sysdeps/ieee754/dbl-64/dla.h"