Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
1e940212
Commit
1e940212
authored
Sep 12, 2015
by
Piotr Caban
Committed by
Alexandre Julliard
Sep 14, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcp: Add _Dtest implementation.
parent
874c3f96
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
112 additions
and
27 deletions
+112
-27
msvcp100.spec
dlls/msvcp100/msvcp100.spec
+3
-3
msvcp110.spec
dlls/msvcp110/msvcp110.spec
+3
-3
msvcp120.spec
dlls/msvcp120/msvcp120.spec
+3
-3
msvcp120.c
dlls/msvcp120/tests/msvcp120.c
+45
-0
msvcp120_app.spec
dlls/msvcp120_app/msvcp120_app.spec
+3
-3
msvcp60.spec
dlls/msvcp60/msvcp60.spec
+3
-3
msvcp70.spec
dlls/msvcp70/msvcp70.spec
+3
-3
msvcp71.spec
dlls/msvcp71/msvcp71.spec
+3
-3
msvcp80.spec
dlls/msvcp80/msvcp80.spec
+3
-3
math.c
dlls/msvcp90/math.c
+34
-0
msvcp90.spec
dlls/msvcp90/msvcp90.spec
+3
-3
math.h
include/msvcrt/math.h
+6
-0
No files found.
dlls/msvcp100/msvcp100.spec
View file @
1e940212
...
...
@@ -2892,14 +2892,14 @@
@ extern _Denorm
@ stub _Dnorm
@ stub _Dscale
@
stub _Dtest
@
cdecl _Dtest(ptr)
@ extern _Eps
@ stub _Exp
@ stub _FCosh
@ extern _FDenorm
@ stub _FDnorm
@ stub _FDscale
@
stub _FDtest
@
cdecl _FDtest(ptr)
@ extern _FEps
@ stub _FExp
@ extern _FInf
...
...
@@ -2920,7 +2920,7 @@
@ stub _LCosh
@ extern _LDenorm
@ stub _LDscale
@
stub _L
Dtest
@
cdecl _LDtest(ptr) _
Dtest
@ extern _LEps
@ stub _LExp
@ extern _LInf
...
...
dlls/msvcp110/msvcp110.spec
View file @
1e940212
...
...
@@ -3745,7 +3745,7 @@
@ cdecl _Do_call(ptr)
@ stub _Dscale
@ stub _Dtento
@
stub _Dtest
@
cdecl _Dtest(ptr)
@ stub _Dunscale
@ extern _Eps
@ stub _Exp
...
...
@@ -3755,7 +3755,7 @@
@ stub _FDnorm
@ stub _FDscale
@ stub _FDtento
@
stub _FDtest
@
cdecl _FDtest(ptr)
@ stub _FDunscale
@ extern _FEps
@ stub _FExp
...
...
@@ -3791,7 +3791,7 @@
@ stub _LDint
@ stub _LDscale
@ stub _LDtento
@
stub _L
Dtest
@
cdecl _LDtest(ptr) _
Dtest
@ stub _LDunscale
@ extern _LEps
@ stub _LExp
...
...
dlls/msvcp120/msvcp120.spec
View file @
1e940212
...
...
@@ -3686,7 +3686,7 @@
@ cdecl _Do_call(ptr)
@ stub _Dscale
@ stub _Dtento
@
stub _Dtest
@
cdecl _Dtest(ptr)
@ stub _Dunscale
@ extern _Eps
@ stub _Exp
...
...
@@ -3696,7 +3696,7 @@
@ stub _FDnorm
@ stub _FDscale
@ stub _FDtento
@
stub _FDtest
@
cdecl _FDtest(ptr)
@ stub _FDunscale
@ extern _FEps
@ stub _FExp
...
...
@@ -3734,7 +3734,7 @@
@ stub _LDint
@ stub _LDscale
@ stub _LDtento
@
stub _L
Dtest
@
cdecl _LDtest(ptr) _
Dtest
@ stub _LDunscale
@ extern _LEps
@ stub _LExp
...
...
dlls/msvcp120/tests/msvcp120.c
View file @
1e940212
...
...
@@ -18,10 +18,25 @@
#include <locale.h>
#include <stdio.h>
#include <math.h>
#include "wine/test.h"
#include "winbase.h"
static
inline
float
__port_infinity
(
void
)
{
static
const
unsigned
__inf_bytes
=
0x7f800000
;
return
*
(
const
float
*
)
&
__inf_bytes
;
}
#define INFINITY __port_infinity()
static
inline
float
__port_nan
(
void
)
{
static
const
unsigned
__nan_bytes
=
0x7fc00000
;
return
*
(
const
float
*
)
&
__nan_bytes
;
}
#define NAN __port_nan()
typedef
int
MSVCRT_long
;
typedef
unsigned
char
MSVCP_bool
;
...
...
@@ -70,6 +85,7 @@ static _Cvtvec* (__cdecl *p__Getcvt)(_Cvtvec*);
static
void
(
CDECL
*
p__Call_once
)(
int
*
once
,
void
(
CDECL
*
func
)(
void
));
static
void
(
CDECL
*
p__Call_onceEx
)(
int
*
once
,
void
(
CDECL
*
func
)(
void
*
),
void
*
argv
);
static
void
(
CDECL
*
p__Do_call
)(
void
*
this
);
static
short
(
__cdecl
*
p__Dtest
)(
double
*
d
);
/* filesystem */
static
ULONGLONG
(
__cdecl
*
p_tr2_sys__File_size
)(
char
const
*
);
...
...
@@ -119,6 +135,8 @@ static BOOL init(void)
"_Call_onceEx"
);
SET
(
p__Do_call
,
"_Do_call"
);
SET
(
p__Dtest
,
"_Dtest"
);
if
(
sizeof
(
void
*
)
==
8
)
{
/* 64-bit initialization */
SET
(
p_tr2_sys__File_size
,
"?_File_size@sys@tr2@std@@YA_KPEBD@Z"
);
...
...
@@ -407,6 +425,32 @@ static void test__Do_call(void)
ok
(
cnt
==
1
,
"func was not called
\n
"
);
}
static
void
test__Dtest
(
void
)
{
double
d
;
short
ret
;
d
=
0
;
ret
=
p__Dtest
(
&
d
);
ok
(
ret
==
FP_ZERO
,
"_Dtest(0) returned %x
\n
"
,
ret
);
d
=
1
;
ret
=
p__Dtest
(
&
d
);
ok
(
ret
==
FP_NORMAL
,
"_Dtest(1) returned %x
\n
"
,
ret
);
d
=
-
1
;
ret
=
p__Dtest
(
&
d
);
ok
(
ret
==
FP_NORMAL
,
"_Dtest(-1) returned %x
\n
"
,
ret
);
d
=
INFINITY
;
ret
=
p__Dtest
(
&
d
);
ok
(
ret
==
FP_INFINITE
,
"_Dtest(INF) returned %x
\n
"
,
ret
);
d
=
NAN
;
ret
=
p__Dtest
(
&
d
);
ok
(
ret
==
FP_NAN
,
"_Dtest(NAN) returned %x
\n
"
,
ret
);
}
static
void
test_tr2_sys__File_size
(
void
)
{
ULONGLONG
val
;
...
...
@@ -910,6 +954,7 @@ START_TEST(msvcp120)
test__Getcvt
();
test__Call_once
();
test__Do_call
();
test__Dtest
();
test_tr2_sys__File_size
();
test_tr2_sys__Equivalent
();
...
...
dlls/msvcp120_app/msvcp120_app.spec
View file @
1e940212
...
...
@@ -3686,7 +3686,7 @@
@ cdecl _Do_call(ptr) msvcp120._Do_call
@ stub _Dscale
@ stub _Dtento
@
stub
_Dtest
@
cdecl _Dtest(ptr) msvcp120.
_Dtest
@ stub _Dunscale
@ extern _Eps msvcp120._Eps
@ stub _Exp
...
...
@@ -3696,7 +3696,7 @@
@ stub _FDnorm
@ stub _FDscale
@ stub _FDtento
@
stub
_FDtest
@
cdecl _FDtest(ptr) msvcp120.
_FDtest
@ stub _FDunscale
@ extern _FEps msvcp120._FEps
@ stub _FExp
...
...
@@ -3734,7 +3734,7 @@
@ stub _LDint
@ stub _LDscale
@ stub _LDtento
@
stub
_LDtest
@
cdecl _LDtest(ptr) msvcp120.
_LDtest
@ stub _LDunscale
@ extern _LEps msvcp120._LEps
@ stub _LExp
...
...
dlls/msvcp60/msvcp60.spec
View file @
1e940212
...
...
@@ -4258,14 +4258,14 @@
@ extern _Denorm _Denorm
@ stub _Dnorm
@ stub _Dscale
@
stub _Dtest
@
cdecl _Dtest(ptr)
@ extern _Eps _Eps
@ stub _Exp
@ stub _FCosh
@ extern _FDenorm _FDenorm
@ stub _FDnorm
@ stub _FDscale
@
stub _FDtest
@
cdecl _FDtest(ptr)
@ extern _FEps _FEps
@ stub _FExp
@ extern _FInf _FInf
...
...
@@ -4282,7 +4282,7 @@
@ stub _LCosh
@ extern _LDenorm _LDenorm
@ stub _LDscale
@
stub _L
Dtest
@
cdecl _LDtest(ptr) _
Dtest
@ extern _LEps _LEps
@ stub _LExp
@ extern _LInf _LInf
...
...
dlls/msvcp70/msvcp70.spec
View file @
1e940212
...
...
@@ -5044,14 +5044,14 @@
@ extern _Denorm
@ stub _Dnorm
@ stub _Dscale
@
stub _Dtest
@
cdecl _Dtest(ptr)
@ extern _Eps
@ stub _Exp
@ stub _FCosh
@ extern _FDenorm
@ stub _FDnorm
@ stub _FDscale
@
stub _FDtest
@
cdecl _FDtest(ptr)
@ extern _FEps
@ stub _FExp
@ extern _FInf
...
...
@@ -5069,7 +5069,7 @@
@ stub _LCosh
@ extern _LDenorm
@ stub _LDscale
@
stub _L
Dtest
@
cdecl _LDtest(ptr) _
Dtest
@ extern _LEps
@ stub _LExp
@ extern _LInf
...
...
dlls/msvcp71/msvcp71.spec
View file @
1e940212
...
...
@@ -5098,14 +5098,14 @@
@ extern _Denorm
@ stub _Dnorm
@ stub _Dscale
@
stub _Dtest
@
cdecl _Dtest(ptr)
@ extern _Eps
@ stub _Exp
@ stub _FCosh
@ extern _FDenorm
@ stub _FDnorm
@ stub _FDscale
@
stub _FDtest
@
cdecl _FDtest(ptr)
@ extern _FEps
@ stub _FExp
@ extern _FInf
...
...
@@ -5125,7 +5125,7 @@
@ stub _LCosh
@ extern _LDenorm
@ stub _LDscale
@
stub _L
Dtest
@
cdecl _LDtest(ptr) _
Dtest
@ extern _LEps
@ stub _LExp
@ extern _LInf
...
...
dlls/msvcp80/msvcp80.spec
View file @
1e940212
...
...
@@ -5705,7 +5705,7 @@
@ stub _Dnorm
@ stub _Dscale
@ stub _Dtentox
@
stub _Dtest
@
cdecl _Dtest(ptr)
@ stub _Dunscale
@ extern _Eps
@ stub _Exp
...
...
@@ -5714,7 +5714,7 @@
@ stub _FDnorm
@ stub _FDscale
@ stub _FDtentox
@
stub _FDtest
@
cdecl _FDtest(ptr)
@ stub _FDunscale
@ extern _FEps
@ stub _FExp
...
...
@@ -5736,7 +5736,7 @@
@ extern _LDenorm
@ stub _LDscale
@ stub _LDtentox
@
stub _L
Dtest
@
cdecl _LDtest(ptr) _
Dtest
@ stub _LDunscale
@ extern _LEps
@ stub _LExp
...
...
dlls/msvcp90/math.c
View file @
1e940212
...
...
@@ -2226,3 +2226,37 @@ complex_double* __cdecl complex_double_sqrt(complex_double *ret, const complex_d
complex_double
c
=
{
0
.
5
,
0
};
return
complex_double_pow
(
ret
,
l
,
&
c
);
}
static
short
dclass
(
double
x
)
{
switch
(
_fpclass
(
x
))
{
case
_FPCLASS_SNAN
:
case
_FPCLASS_QNAN
:
return
FP_NAN
;
case
_FPCLASS_NINF
:
case
_FPCLASS_PINF
:
return
FP_INFINITE
;
case
_FPCLASS_ND
:
case
_FPCLASS_PD
:
return
FP_SUBNORMAL
;
case
_FPCLASS_NN
:
case
_FPCLASS_PN
:
default
:
return
FP_NORMAL
;
case
_FPCLASS_NZ
:
case
_FPCLASS_PZ
:
return
FP_ZERO
;
}
}
/* _Dtest */
short
__cdecl
_Dtest
(
double
*
x
)
{
return
dclass
(
*
x
);
}
/* _FDtest */
short
__cdecl
_FDtest
(
float
*
x
)
{
return
dclass
(
*
x
);
}
dlls/msvcp90/msvcp90.spec
View file @
1e940212
...
...
@@ -6480,14 +6480,14 @@
@ extern _Denorm
@ stub _Dnorm
@ stub _Dscale
@
stub _Dtest
@
cdecl _Dtest(ptr)
@ extern _Eps
@ stub _Exp
@ stub _FCosh
@ extern _FDenorm
@ stub _FDnorm
@ stub _FDscale
@
stub _FDtest
@
cdecl _FDtest(ptr)
@ extern _FEps
@ stub _FExp
@ extern _FInf
...
...
@@ -6507,7 +6507,7 @@
@ stub _LCosh
@ extern _LDenorm
@ stub _LDscale
@
stub _L
Dtest
@
cdecl _LDtest(ptr) _
Dtest
@ extern _LEps
@ stub _LExp
@ extern _LInf
...
...
include/msvcrt/math.h
View file @
1e940212
...
...
@@ -146,6 +146,12 @@ static const union {
# endif
#endif
#define FP_INFINITE 1
#define FP_NAN 2
#define FP_NORMAL -1
#define FP_SUBNORMAL -2
#define FP_ZERO 0
#ifdef __cplusplus
}
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment