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
abdb6d68
Commit
abdb6d68
authored
Aug 13, 2001
by
Jukka Heinonen
Committed by
Alexandre Julliard
Aug 13, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed _control87 return value, use of wrong assembler command to get
fp control word and a bug that inverted _IC_AFFINE flag. Made _controlfp work as specified in MSDN.
parent
378fc22b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
11 deletions
+15
-11
math.c
dlls/msvcrt/math.c
+15
-11
No files found.
dlls/msvcrt/math.c
View file @
abdb6d68
...
...
@@ -486,10 +486,15 @@ double _chgsign(double num)
unsigned
int
_control87
(
unsigned
int
newval
,
unsigned
int
mask
)
{
#if defined(__GNUC__) && defined(__i386__)
unsigned
int
fpword
,
flags
=
0
;
unsigned
int
fpword
=
0
;
unsigned
int
flags
=
0
;
TRACE
(
"(%08x, %08x): Called
\n
"
,
newval
,
mask
);
/* Get fp control word */
__asm__
__volatile__
(
"fstsw %0"
:
"=m"
(
fpword
)
:
);
__asm__
__volatile__
(
"fstcw %0"
:
"=m"
(
fpword
)
:
);
TRACE
(
"Control word before : %08x
\n
"
,
fpword
);
/* Convert into mask constants */
if
(
fpword
&
0x1
)
flags
|=
_EM_INVALID
;
...
...
@@ -531,13 +536,17 @@ unsigned int _control87(unsigned int newval, unsigned int mask)
case
_PC_53
:
fpword
|=
0x200
;
break
;
case
_PC_24
:
fpword
|=
0x0
;
break
;
}
if
(
!
(
flags
&
_IC_AFFINE
))
fpword
|=
0x1000
;
if
(
flags
&
_IC_AFFINE
)
fpword
|=
0x1000
;
TRACE
(
"Control word after : %08x
\n
"
,
fpword
);
/* Put fp control word */
__asm__
__volatile__
(
"fldcw %0"
:
:
"m"
(
fpword
)
);
return
fpword
;
return
flags
;
#else
return
_controlfp
(
newval
,
mask
);
FIXME
(
":Not Implemented!
\n
"
);
return
0
;
#endif
}
...
...
@@ -546,12 +555,7 @@ unsigned int _control87(unsigned int newval, unsigned int mask)
*/
unsigned
int
_controlfp
(
unsigned
int
newval
,
unsigned
int
mask
)
{
#if defined(__GNUC__) && defined(__i386__)
return
_control87
(
newval
,
mask
);
#else
FIXME
(
":Not Implemented!
\n
"
);
return
0
;
#endif
return
_control87
(
newval
,
mask
&
~
_EM_DENORMAL
);
}
/*********************************************************************
...
...
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