Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
10200af7
Commit
10200af7
authored
Feb 17, 2017
by
Piotr Caban
Committed by
Alexandre Julliard
Feb 17, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcr120: Add _except1 implementation.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e3761232
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
96 additions
and
4 deletions
+96
-4
api-ms-win-crt-math-l1-1-0.spec
...pi-ms-win-crt-math-l1-1-0/api-ms-win-crt-math-l1-1-0.spec
+1
-1
msvcr120.spec
dlls/msvcr120/msvcr120.spec
+1
-1
msvcr120_app.spec
dlls/msvcr120_app/msvcr120_app.spec
+1
-1
math.c
dlls/msvcrt/math.c
+92
-0
ucrtbase.spec
dlls/ucrtbase/ucrtbase.spec
+1
-1
No files found.
dlls/api-ms-win-crt-math-l1-1-0/api-ms-win-crt-math-l1-1-0.spec
View file @
10200af7
...
...
@@ -62,7 +62,7 @@
@ stub _dsin
@ cdecl _dtest(ptr) ucrtbase._dtest
@ stub _dunscale
@
stub
_except1
@
cdecl _except1(long long double double long ptr) ucrtbase.
_except1
@ stub _fd_int
@ cdecl _fdclass(float) ucrtbase._fdclass
@ stub _fdexp
...
...
dlls/msvcr120/msvcr120.spec
View file @
10200af7
...
...
@@ -1124,7 +1124,7 @@
@ extern _environ MSVCRT__environ
@ cdecl _eof(long) MSVCRT__eof
@ cdecl _errno() MSVCRT__errno
@
stub _except1
@
cdecl _except1(long long double double long ptr)
@ cdecl -arch=i386 _except_handler2(ptr ptr ptr ptr)
@ cdecl -arch=i386 _except_handler3(ptr ptr ptr ptr)
@ cdecl -arch=i386 _except_handler4_common(ptr ptr ptr ptr ptr ptr)
...
...
dlls/msvcr120_app/msvcr120_app.spec
View file @
10200af7
...
...
@@ -1060,7 +1060,7 @@
@ extern _environ msvcr120._environ
@ cdecl _eof(long) msvcr120._eof
@ cdecl _errno() msvcr120._errno
@
stub
_except1
@
cdecl _except1(long long double double long ptr) msvcr120.
_except1
@ cdecl -arch=i386 _except_handler2(ptr ptr ptr ptr) msvcr120._except_handler2
@ cdecl -arch=i386 _except_handler3(ptr ptr ptr ptr) msvcr120._except_handler3
@ cdecl -arch=i386 _except_handler4_common(ptr ptr ptr ptr ptr ptr) msvcr120._except_handler4_common
...
...
dlls/msvcrt/math.c
View file @
10200af7
...
...
@@ -2986,3 +2986,95 @@ float CDECL MSVCR120_nanf(const char *tagp)
{
return
NAN
;
}
/*********************************************************************
* _except1 (MSVCR120.@)
* TODO:
* - find meaning of ignored cw and operation bits
* - unk parameter
*/
double
CDECL
_except1
(
DWORD
fpe
,
_FP_OPERATION_CODE
op
,
double
arg
,
double
res
,
DWORD
cw
,
void
*
unk
)
{
ULONG_PTR
exception_arg
;
DWORD
exception
=
0
;
MSVCRT_fenv_t
env
;
DWORD
fpword
=
0
;
WORD
operation
;
TRACE
(
"(%x %x %lf %lf %x %p)
\n
"
,
fpe
,
op
,
arg
,
res
,
cw
,
unk
);
#ifdef _WIN64
cw
=
((
cw
>>
7
)
&
0x3f
)
|
((
cw
>>
3
)
&
0xc00
);
#endif
operation
=
op
<<
5
;
exception_arg
=
(
ULONG_PTR
)
&
operation
;
MSVCRT_fegetenv
(
&
env
);
if
(
fpe
&
0x1
)
{
/* overflow */
if
((
fpe
==
0x1
&&
(
cw
&
0x8
))
||
(
fpe
==
0x11
&&
(
cw
&
0x28
)))
{
/* 32-bit version also sets SW_INEXACT here */
env
.
status
|=
MSVCRT__SW_OVERFLOW
;
if
(
fpe
&
0x10
)
env
.
status
|=
MSVCRT__SW_INEXACT
;
res
=
signbit
(
res
)
?
-
INFINITY
:
INFINITY
;
}
else
{
exception
=
EXCEPTION_FLT_OVERFLOW
;
}
}
else
if
(
fpe
&
0x2
)
{
/* underflow */
if
((
fpe
==
0x2
&&
(
cw
&
0x10
))
||
(
fpe
==
0x12
&&
(
cw
&
0x30
)))
{
env
.
status
|=
MSVCRT__SW_UNDERFLOW
;
if
(
fpe
&
0x10
)
env
.
status
|=
MSVCRT__SW_INEXACT
;
res
=
signbit
(
res
)
?
-
0
.
0
:
0
.
0
;
}
else
{
exception
=
EXCEPTION_FLT_UNDERFLOW
;
}
}
else
if
(
fpe
&
0x4
)
{
/* zerodivide */
if
((
fpe
==
0x4
&&
(
cw
&
0x4
))
||
(
fpe
==
0x14
&&
(
cw
&
0x24
)))
{
env
.
status
|=
MSVCRT__SW_ZERODIVIDE
;
if
(
fpe
&
0x10
)
env
.
status
|=
MSVCRT__SW_INEXACT
;
}
else
{
exception
=
EXCEPTION_FLT_DIVIDE_BY_ZERO
;
}
}
else
if
(
fpe
&
0x8
)
{
/* invalid */
if
(
fpe
==
0x8
&&
(
cw
&
0x1
))
{
env
.
status
|=
MSVCRT__SW_INVALID
;
}
else
{
exception
=
EXCEPTION_FLT_INVALID_OPERATION
;
}
}
else
if
(
fpe
&
0x10
)
{
/* inexact */
if
(
fpe
==
0x10
&&
(
cw
&
0x20
))
{
env
.
status
|=
MSVCRT__SW_INEXACT
;
}
else
{
exception
=
EXCEPTION_FLT_INEXACT_RESULT
;
}
}
if
(
exception
)
env
.
status
=
0
;
MSVCRT_fesetenv
(
&
env
);
if
(
exception
)
RaiseException
(
exception
,
0
,
1
,
&
exception_arg
);
if
(
cw
&
0x1
)
fpword
|=
MSVCRT__EM_INVALID
;
if
(
cw
&
0x2
)
fpword
|=
MSVCRT__EM_DENORMAL
;
if
(
cw
&
0x4
)
fpword
|=
MSVCRT__EM_ZERODIVIDE
;
if
(
cw
&
0x8
)
fpword
|=
MSVCRT__EM_OVERFLOW
;
if
(
cw
&
0x10
)
fpword
|=
MSVCRT__EM_UNDERFLOW
;
if
(
cw
&
0x20
)
fpword
|=
MSVCRT__EM_INEXACT
;
switch
(
cw
&
0xc00
)
{
case
0xc00
:
fpword
|=
MSVCRT__RC_UP
|
MSVCRT__RC_DOWN
;
break
;
case
0x800
:
fpword
|=
MSVCRT__RC_UP
;
break
;
case
0x400
:
fpword
|=
MSVCRT__RC_DOWN
;
break
;
}
switch
(
cw
&
0x300
)
{
case
0x0
:
fpword
|=
MSVCRT__PC_24
;
break
;
case
0x200
:
fpword
|=
MSVCRT__PC_53
;
break
;
case
0x300
:
fpword
|=
MSVCRT__PC_64
;
break
;
}
if
(
cw
&
0x1000
)
fpword
|=
MSVCRT__IC_AFFINE
;
_control87
(
fpword
,
0xffffffff
);
return
res
;
}
dlls/ucrtbase/ucrtbase.spec
View file @
10200af7
...
...
@@ -271,7 +271,7 @@
@ cdecl _endthreadex(long)
@ cdecl _eof(long) MSVCRT__eof
@ cdecl _errno() MSVCRT__errno
@
stub _except1
@
cdecl _except1(long long double double long ptr)
@ cdecl -arch=i386 _except_handler2(ptr ptr ptr ptr)
@ cdecl -arch=i386 _except_handler3(ptr ptr ptr ptr)
@ cdecl -arch=i386 _except_handler4_common(ptr ptr ptr ptr ptr ptr)
...
...
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