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
4b17ec74
Commit
4b17ec74
authored
Jan 25, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Implemented _statusfp2.
parent
a8d8e4a3
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
58 additions
and
16 deletions
+58
-16
msvcr100.spec
dlls/msvcr100/msvcr100.spec
+1
-1
msvcr80.spec
dlls/msvcr80/msvcr80.spec
+1
-1
msvcr90.spec
dlls/msvcr90/msvcr90.spec
+1
-1
math.c
dlls/msvcrt/math.c
+54
-13
msvcrt.spec
dlls/msvcrt/msvcrt.spec
+1
-0
No files found.
dlls/msvcr100/msvcr100.spec
View file @
4b17ec74
...
...
@@ -1128,7 +1128,7 @@
@ cdecl _stat64(str ptr) msvcrt._stat64
@ cdecl _stat64i32(str ptr) msvcr90._stat64i32
@ cdecl _statusfp() msvcrt._statusfp
@
stub
_statusfp2
@
cdecl -arch=i386 _statusfp2(ptr ptr) msvcrt.
_statusfp2
@ stub _strcoll_l
@ cdecl _strdate(ptr) msvcrt._strdate
@ cdecl _strdate_s(ptr long) msvcrt._strdate_s
...
...
dlls/msvcr80/msvcr80.spec
View file @
4b17ec74
...
...
@@ -982,7 +982,7 @@
@ cdecl _stat64(str ptr) msvcrt._stat64
@ cdecl _stat64i32(str ptr) msvcr90._stat64i32
@ cdecl _statusfp() msvcrt._statusfp
@
stub
_statusfp2
@
cdecl -arch=i386 _statusfp2(ptr ptr) msvcrt.
_statusfp2
@ stub _strcoll_l
@ cdecl _strdate(ptr) msvcrt._strdate
@ cdecl _strdate_s(ptr long) msvcrt._strdate_s
...
...
dlls/msvcr90/msvcr90.spec
View file @
4b17ec74
...
...
@@ -968,7 +968,7 @@
@ cdecl _stat64(str ptr) msvcrt._stat64
@ cdecl _stat64i32(str ptr)
@ cdecl _statusfp() msvcrt._statusfp
@
stub
_statusfp2
@
cdecl -arch=i386 _statusfp2(ptr ptr) msvcrt.
_statusfp2
@ stub _strcoll_l
@ cdecl _strdate(ptr) msvcrt._strdate
@ cdecl _strdate_s(ptr long) msvcrt._strdate_s
...
...
dlls/msvcrt/math.c
View file @
4b17ec74
...
...
@@ -768,25 +768,66 @@ void CDECL MSVCRT___setusermatherr(MSVCRT_matherr_func func)
}
/**********************************************************************
* _statusfp2 (MSVCRT.@)
*
* Not exported by native msvcrt, added in msvcr80.
*/
#if defined(__i386__) || defined(__x86_64__)
void
CDECL
_statusfp2
(
unsigned
int
*
x86_sw
,
unsigned
int
*
sse2_sw
)
{
#ifdef __GNUC__
unsigned
int
flags
;
unsigned
long
fpword
;
if
(
x86_sw
)
{
__asm__
__volatile__
(
"fstsw %0"
:
"=m"
(
fpword
)
);
flags
=
0
;
if
(
fpword
&
0x1
)
flags
|=
MSVCRT__SW_INVALID
;
if
(
fpword
&
0x2
)
flags
|=
MSVCRT__SW_DENORMAL
;
if
(
fpword
&
0x4
)
flags
|=
MSVCRT__SW_ZERODIVIDE
;
if
(
fpword
&
0x8
)
flags
|=
MSVCRT__SW_OVERFLOW
;
if
(
fpword
&
0x10
)
flags
|=
MSVCRT__SW_UNDERFLOW
;
if
(
fpword
&
0x20
)
flags
|=
MSVCRT__SW_INEXACT
;
*
x86_sw
=
flags
;
}
if
(
!
sse2_sw
)
return
;
if
(
sse2_supported
)
{
__asm__
__volatile__
(
"stmxcsr %0"
:
"=m"
(
fpword
)
);
flags
=
0
;
if
(
fpword
&
0x1
)
flags
|=
MSVCRT__SW_INVALID
;
if
(
fpword
&
0x2
)
flags
|=
MSVCRT__SW_DENORMAL
;
if
(
fpword
&
0x4
)
flags
|=
MSVCRT__SW_ZERODIVIDE
;
if
(
fpword
&
0x8
)
flags
|=
MSVCRT__SW_OVERFLOW
;
if
(
fpword
&
0x10
)
flags
|=
MSVCRT__SW_UNDERFLOW
;
if
(
fpword
&
0x20
)
flags
|=
MSVCRT__SW_INEXACT
;
*
sse2_sw
=
flags
;
}
else
*
sse2_sw
=
0
;
#else
FIXME
(
"not implemented
\n
"
);
#endif
}
#endif
/**********************************************************************
* _statusfp (MSVCRT.@)
*/
unsigned
int
CDECL
_statusfp
(
void
)
{
unsigned
int
retVal
=
0
;
#if defined(__GNUC__) && defined(__i386__)
unsigned
int
fpword
;
__asm__
__volatile__
(
"fstsw %0"
:
"=m"
(
fpword
)
:
);
if
(
fpword
&
0x1
)
retVal
|=
MSVCRT__SW_INVALID
;
if
(
fpword
&
0x2
)
retVal
|=
MSVCRT__SW_DENORMAL
;
if
(
fpword
&
0x4
)
retVal
|=
MSVCRT__SW_ZERODIVIDE
;
if
(
fpword
&
0x8
)
retVal
|=
MSVCRT__SW_OVERFLOW
;
if
(
fpword
&
0x10
)
retVal
|=
MSVCRT__SW_UNDERFLOW
;
if
(
fpword
&
0x20
)
retVal
|=
MSVCRT__SW_INEXACT
;
#if defined(__i386__) || defined(__x86_64__)
unsigned
int
x86_sw
,
sse2_sw
;
_statusfp2
(
&
x86_sw
,
&
sse2_sw
);
/* FIXME: there's no definition for ambiguous status, just return all status bits for now */
return
x86_sw
|
sse2_sw
;
#else
FIXME
(
":Not implemented!
\n
"
);
FIXME
(
"not implemented
\n
"
);
return
0
;
#endif
return
retVal
;
}
/*********************************************************************
...
...
dlls/msvcrt/msvcrt.spec
View file @
4b17ec74
...
...
@@ -1485,5 +1485,6 @@
@ cdecl _set_abort_behavior(long long) MSVCRT__set_abort_behavior
@ cdecl _set_invalid_parameter_handler(ptr)
@ cdecl _set_purecall_handler(ptr)
@ cdecl -arch=i386 _statusfp2(ptr ptr)
@ cdecl _wcstod_l(wstr ptr) MSVCRT__wcstod_l
@ cdecl _wdupenv_s(ptr ptr str)
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