Martin Storsjo : msvcrt: Provide the fmaf function on i386.
Alexandre Julliard
julliard at winehq.org
Thu Aug 1 17:16:47 CDT 2019
Module: wine
Branch: master
Commit: dec4c99ae7d62cc2ceb98c4f60ec05ec2072a3c2
URL: https://source.winehq.org/git/wine.git/?a=commit;h=dec4c99ae7d62cc2ceb98c4f60ec05ec2072a3c2
Author: Martin Storsjo <martin at martin.st>
Date: Wed Jul 31 00:08:49 2019 +0300
msvcrt: Provide the fmaf function on i386.
This is one of the new -f suffixed C99 math functions that actually
are available on all architectures, even on i386.
Signed-off-by: Martin Storsjo <martin at martin.st>
Signed-off-by: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
.../api-ms-win-crt-math-l1-1-0.spec | 2 +-
dlls/msvcr120/msvcr120.spec | 2 +-
dlls/msvcr120_app/msvcr120_app.spec | 2 +-
dlls/msvcrt/math.c | 32 +++++++++++-----------
dlls/ucrtbase/ucrtbase.spec | 2 +-
5 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/dlls/api-ms-win-crt-math-l1-1-0/api-ms-win-crt-math-l1-1-0.spec b/dlls/api-ms-win-crt-math-l1-1-0/api-ms-win-crt-math-l1-1-0.spec
index 3a5991f..bc281ca 100644
--- a/dlls/api-ms-win-crt-math-l1-1-0/api-ms-win-crt-math-l1-1-0.spec
+++ b/dlls/api-ms-win-crt-math-l1-1-0/api-ms-win-crt-math-l1-1-0.spec
@@ -242,7 +242,7 @@
@ cdecl floor(double) ucrtbase.floor
@ cdecl -arch=arm,x86_64,arm64 floorf(float) ucrtbase.floorf
@ cdecl fma(double double double) ucrtbase.fma
-@ cdecl -arch=arm,x86_64,arm64 fmaf(float float float) ucrtbase.fmaf
+@ cdecl fmaf(float float float) ucrtbase.fmaf
@ stub fmal
@ cdecl fmax(double double) ucrtbase.fmax
@ cdecl fmaxf(float float) ucrtbase.fmaxf
diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec
index 9707211..dc887b7 100644
--- a/dlls/msvcr120/msvcr120.spec
+++ b/dlls/msvcr120/msvcr120.spec
@@ -2165,7 +2165,7 @@
@ cdecl floor(double) MSVCRT_floor
@ cdecl -arch=arm,x86_64,arm64 floorf(float) MSVCRT_floorf
@ cdecl fma(double double double) MSVCRT_fma
-@ cdecl -arch=arm,x86_64,arm64 fmaf(float float float) MSVCRT_fmaf
+@ cdecl fmaf(float float float) MSVCRT_fmaf
@ stub fmal
@ cdecl fmax(double double) MSVCR120_fmax
@ cdecl fmaxf(float float) MSVCR120_fmaxf
diff --git a/dlls/msvcr120_app/msvcr120_app.spec b/dlls/msvcr120_app/msvcr120_app.spec
index 9b7727e..c56d1a9 100644
--- a/dlls/msvcr120_app/msvcr120_app.spec
+++ b/dlls/msvcr120_app/msvcr120_app.spec
@@ -1831,7 +1831,7 @@
@ cdecl floor(double) msvcr120.floor
@ cdecl -arch=arm,x86_64,arm64 floorf(float) msvcr120.floorf
@ cdecl fma(double double double) msvcr120.fma
-@ cdecl -arch=arm,x86_64,arm64 fmaf(float float float) msvcr120.fmaf
+@ cdecl fmaf(float float float) msvcr120.fmaf
@ stub fmal
@ cdecl fmax(double double) msvcr120.fmax
@ cdecl fmaxf(float float) msvcr120.fmaxf
diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c
index 63744e3..c29539e 100644
--- a/dlls/msvcrt/math.c
+++ b/dlls/msvcrt/math.c
@@ -388,22 +388,6 @@ float CDECL MSVCRT_floorf( float x )
}
/*********************************************************************
- * fmaf (MSVCRT.@)
- */
-float CDECL MSVCRT_fmaf( float x, float y, float z )
-{
-#ifdef HAVE_FMAF
- float w = fmaf(x, y, z);
-#else
- float w = x * y + z;
-#endif
- if ((isinf(x) && y == 0) || (x == 0 && isinf(y))) *MSVCRT__errno() = MSVCRT_EDOM;
- else if (isinf(x) && isinf(z) && x != z) *MSVCRT__errno() = MSVCRT_EDOM;
- else if (isinf(y) && isinf(z) && y != z) *MSVCRT__errno() = MSVCRT_EDOM;
- return w;
-}
-
-/*********************************************************************
* frexpf (MSVCRT.@)
*/
float CDECL MSVCRT_frexpf( float x, int *exp )
@@ -896,6 +880,22 @@ double CDECL MSVCRT_fma( double x, double y, double z )
}
/*********************************************************************
+ * fmaf (MSVCRT.@)
+ */
+float CDECL MSVCRT_fmaf( float x, float y, float z )
+{
+#ifdef HAVE_FMAF
+ float w = fmaf(x, y, z);
+#else
+ float w = x * y + z;
+#endif
+ if ((isinf(x) && y == 0) || (x == 0 && isinf(y))) *MSVCRT__errno() = MSVCRT_EDOM;
+ else if (isinf(x) && isinf(z) && x != z) *MSVCRT__errno() = MSVCRT_EDOM;
+ else if (isinf(y) && isinf(z) && y != z) *MSVCRT__errno() = MSVCRT_EDOM;
+ return w;
+}
+
+/*********************************************************************
* fabs (MSVCRT.@)
*/
double CDECL MSVCRT_fabs( double x )
diff --git a/dlls/ucrtbase/ucrtbase.spec b/dlls/ucrtbase/ucrtbase.spec
index 567f200..e290c14 100644
--- a/dlls/ucrtbase/ucrtbase.spec
+++ b/dlls/ucrtbase/ucrtbase.spec
@@ -2306,7 +2306,7 @@
@ cdecl floor(double) MSVCRT_floor
@ cdecl -arch=arm,x86_64,arm64 floorf(float) MSVCRT_floorf
@ cdecl fma(double double double) MSVCRT_fma
-@ cdecl -arch=arm,x86_64,arm64 fmaf(float float float) MSVCRT_fmaf
+@ cdecl fmaf(float float float) MSVCRT_fmaf
@ stub fmal
@ cdecl fmax(double double) MSVCR120_fmax
@ cdecl fmaxf(float float) MSVCR120_fmaxf
More information about the wine-cvs
mailing list