Work around old buggy program which cannot cope with memcpy semantics.
[glibc.git] / sysdeps / x86_64 / multiarch / s_fmaf.c
blob85ef65a50ecb9d62cb6ab41c0865e79d7b497d31
1 /* FMA version of fmaf.
2 Copyright (C) 2009, 2010 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, write to the Free
17 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
18 02111-1307 USA. */
20 #include <config.h>
21 #include <math.h>
22 #include <init-arch.h>
24 #ifdef HAVE_AVX_SUPPORT
26 extern float __fmaf_sse2 (float x, float y, float z) attribute_hidden;
29 static float
30 __fmaf_fma (float x, float y, float z)
32 asm ("vfmadd213ss %3, %2, %0" : "=x" (x) : "0" (x), "x" (y), "xm" (z));
33 return x;
36 libm_ifunc (__fmaf, HAS_FMA ? __fmaf_fma : __fmaf_sse2);
37 weak_alias (__fmaf, fmaf)
39 # define __fmaf __fmaf_sse2
40 #endif
42 #include <sysdeps/ieee754/dbl-64/s_fmaf.c>