Piotr Caban : msvcr120: Add fmax implementation.

Alexandre Julliard julliard at wine.codeweavers.com
Tue May 26 09:14:35 CDT 2015


Module: wine
Branch: master
Commit: ec2f02db0cdb8de2368696cbb34f994a8643d859
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=ec2f02db0cdb8de2368696cbb34f994a8643d859

Author: Piotr Caban <piotr at codeweavers.com>
Date:   Tue May 26 14:54:40 2015 +0200

msvcr120: Add fmax implementation.

---

 dlls/msvcr120/msvcr120.spec         |  6 +++---
 dlls/msvcr120_app/msvcr120_app.spec |  6 +++---
 dlls/msvcrt/math.c                  | 28 ++++++++++++++++++++++++++++
 3 files changed, 34 insertions(+), 6 deletions(-)

diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec
index bf6159b..7fa5f89 100644
--- a/dlls/msvcr120/msvcr120.spec
+++ b/dlls/msvcr120/msvcr120.spec
@@ -2164,9 +2164,9 @@
 @ stub fma
 @ stub fmaf
 @ stub fmal
-@ stub fmax
-@ stub fmaxf
-@ stub fmaxl
+@ cdecl fmax(double double) MSVCR120_fmax
+@ cdecl fmaxf(float float) MSVCR120_fmaxf
+@ cdecl fmaxl(double double) MSVCR120_fmax
 @ stub fmin
 @ stub fminf
 @ stub fminl
diff --git a/dlls/msvcr120_app/msvcr120_app.spec b/dlls/msvcr120_app/msvcr120_app.spec
index 903120b..271e2f0 100644
--- a/dlls/msvcr120_app/msvcr120_app.spec
+++ b/dlls/msvcr120_app/msvcr120_app.spec
@@ -1833,9 +1833,9 @@
 @ stub fma
 @ stub fmaf
 @ stub fmal
-@ stub fmax
-@ stub fmaxf
-@ stub fmaxl
+@ cdecl fmax(double double) msvcr120.fmax
+@ cdecl fmaxf(float float) msvcr120.fmaxf
+@ cdecl fmaxl(double double) msvcr120.fmaxl
 @ stub fmin
 @ stub fminf
 @ stub fminl
diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c
index 7c971d3..f796dd9 100644
--- a/dlls/msvcrt/math.c
+++ b/dlls/msvcrt/math.c
@@ -2605,3 +2605,31 @@ short CDECL MSVCR120__ldtest(LDOUBLE *x)
 {
     return MSVCR120__dclass(*x);
 }
+
+/*********************************************************************
+ *      fmaxf (MSVCR120.@)
+ */
+float CDECL MSVCR120_fmaxf(float x, float y)
+{
+    if(isnanf(x))
+        return y;
+    if(isnanf(y))
+        return x;
+    if(x==0 && y==0)
+        return signbit(x) ? y : x;
+    return x<y ? y : x;
+}
+
+/*********************************************************************
+ *      fmax (MSVCR120.@)
+ */
+double CDECL MSVCR120_fmax(double x, double y)
+{
+    if(isnan(x))
+        return y;
+    if(isnan(y))
+        return x;
+    if(x==0 && y==0)
+        return signbit(x) ? y : x;
+    return x<y ? y : x;
+}




More information about the wine-cvs mailing list