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
98d7a021
Commit
98d7a021
authored
Jan 25, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Implemented _clearfp for SSE2 and x86_64.
parent
4b17ec74
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
5 deletions
+26
-5
math.c
dlls/msvcrt/math.c
+26
-5
No files found.
dlls/msvcrt/math.c
View file @
98d7a021
...
@@ -835,13 +835,34 @@ unsigned int CDECL _statusfp(void)
...
@@ -835,13 +835,34 @@ unsigned int CDECL _statusfp(void)
*/
*/
unsigned
int
CDECL
_clearfp
(
void
)
unsigned
int
CDECL
_clearfp
(
void
)
{
{
unsigned
int
retVal
=
_statusfp
();
unsigned
int
flags
=
0
;
#if defined(__GNUC__) && defined(__i386__)
#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
__asm__
__volatile__
(
"fnclex"
);
unsigned
long
fpword
;
__asm__
__volatile__
(
"fnstsw %0; fnclex"
:
"=m"
(
fpword
)
);
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
;
if
(
sse2_supported
)
{
__asm__
__volatile__
(
"stmxcsr %0"
:
"=m"
(
fpword
)
);
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
;
fpword
&=
~
0x3f
;
__asm__
__volatile__
(
"ldmxcsr %0"
:
:
"m"
(
fpword
)
);
}
#else
#else
FIXME
(
":Not Implemented
\n
"
);
FIXME
(
"not implemented
\n
"
);
#endif
#endif
return
retVal
;
return
flags
;
}
}
/*********************************************************************
/*********************************************************************
...
...
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