Piotr Caban : msvcr120: Add fmin implementation.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Sep 14 09:44:34 CDT 2015


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

Author: Piotr Caban <piotr at codeweavers.com>
Date:   Sat Sep 12 14:29:00 2015 +0200

msvcr120: Add fmin 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 c2aacac..0eb7ade 100644
--- a/dlls/msvcr120/msvcr120.spec
+++ b/dlls/msvcr120/msvcr120.spec
@@ -2167,9 +2167,9 @@
 @ cdecl fmax(double double) MSVCR120_fmax
 @ cdecl fmaxf(float float) MSVCR120_fmaxf
 @ cdecl fmaxl(double double) MSVCR120_fmax
-@ stub fmin
-@ stub fminf
-@ stub fminl
+@ cdecl fmin(double double) MSVCR120_fmin
+@ cdecl fminf(float float) MSVCR120_fminf
+@ cdecl fminl(double double) MSVCR120_fmin
 @ cdecl fmod(double double) MSVCRT_fmod
 @ cdecl -arch=arm,x86_64 fmodf(float float) MSVCRT_fmodf
 @ cdecl fopen(str str) MSVCRT_fopen
diff --git a/dlls/msvcr120_app/msvcr120_app.spec b/dlls/msvcr120_app/msvcr120_app.spec
index 392c3f7..ec97ad7 100644
--- a/dlls/msvcr120_app/msvcr120_app.spec
+++ b/dlls/msvcr120_app/msvcr120_app.spec
@@ -1836,9 +1836,9 @@
 @ cdecl fmax(double double) msvcr120.fmax
 @ cdecl fmaxf(float float) msvcr120.fmaxf
 @ cdecl fmaxl(double double) msvcr120.fmaxl
-@ stub fmin
-@ stub fminf
-@ stub fminl
+@ cdecl fmin(double double) msvcr120.fmin
+@ cdecl fminf(float float) msvcr120.fminf
+@ cdecl fminl(double double) msvcr120.fminl
 @ cdecl fmod(double double) msvcr120.fmod
 @ cdecl -arch=arm,x86_64 fmodf(float float) msvcr120.fmodf
 @ cdecl fopen(str str) msvcr120.fopen
diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c
index 162dcfb..2459bf5 100644
--- a/dlls/msvcrt/math.c
+++ b/dlls/msvcrt/math.c
@@ -2683,3 +2683,31 @@ int CDECL MSVCR120__dsign(double x)
 {
     return signbit(x) ? 0x8000 : 0;
 }
+
+/*********************************************************************
+ *      fminf (MSVCR120.@)
+ */
+float CDECL MSVCR120_fminf(float x, float y)
+{
+    if(isnanf(x))
+        return y;
+    if(isnanf(y))
+        return x;
+    if(x==0 && y==0)
+        return signbit(x) ? x : y;
+    return x<y ? x : y;
+}
+
+/*********************************************************************
+ *      fmin (MSVCR120.@)
+ */
+double CDECL MSVCR120_fmin(double x, double y)
+{
+    if(isnan(x))
+        return y;
+    if(isnan(y))
+        return x;
+    if(x==0 && y==0)
+        return signbit(x) ? x : y;
+    return x<y ? x : y;
+}




More information about the wine-cvs mailing list