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
0c808ff4
Commit
0c808ff4
authored
Aug 04, 2021
by
Piotr Caban
Committed by
Alexandre Julliard
Aug 04, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Use _setfp helper on all architectures.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b28b409b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
21 deletions
+4
-21
math.c
dlls/msvcrt/math.c
+4
-21
No files found.
dlls/msvcrt/math.c
View file @
0c808ff4
...
...
@@ -5235,12 +5235,10 @@ static BOOL _setfp_sse( unsigned int *cw, unsigned int cw_mask,
}
#endif
#if defined(__i386__) || defined(__x86_64__) || defined(__aarch64__) || (defined(__arm__) && !defined(__SOFTFP__))
static
BOOL
_setfp
(
unsigned
int
*
cw
,
unsigned
int
cw_mask
,
unsigned
int
*
sw
,
unsigned
int
sw_mask
)
{
#if defined(__GNUC__) || defined(__clang__)
#ifdef __i386__
#if (defined(__GNUC__) || defined(__clang__)) && defined(__i386__)
unsigned
long
oldcw
=
0
,
newcw
=
0
;
unsigned
long
oldsw
=
0
,
newsw
=
0
;
unsigned
int
flags
;
...
...
@@ -5503,7 +5501,6 @@ static BOOL _setfp( unsigned int *cw, unsigned int cw_mask,
if
(
old_fpscr
!=
fpscr
)
__asm__
__volatile__
(
"vmsr fpscr, %0"
::
"r"
(
fpscr
)
);
return
TRUE
;
#endif
#else
FIXME
(
"not implemented
\n
"
);
if
(
cw
)
*
cw
=
0
;
...
...
@@ -5511,7 +5508,6 @@ static BOOL _setfp( unsigned int *cw, unsigned int cw_mask,
return
FALSE
;
#endif
}
#endif
/**********************************************************************
* _statusfp2 (MSVCR80.@)
...
...
@@ -5540,10 +5536,8 @@ unsigned int CDECL _statusfp(void)
_statusfp2
(
&
x86_sw
,
&
sse2_sw
);
/* FIXME: there's no definition for ambiguous status, just return all status bits for now */
flags
=
x86_sw
|
sse2_sw
;
#elif defined(__x86_64__) || defined(__aarch64__) || (defined(__arm__) && !defined(__SOFTFP__))
_setfp
(
NULL
,
0
,
&
flags
,
0
);
#else
FIXME
(
"not implemented
\n
"
);
_setfp
(
NULL
,
0
,
&
flags
,
0
);
#endif
return
flags
;
}
...
...
@@ -5563,10 +5557,8 @@ unsigned int CDECL _clearfp(void)
_setfp_sse
(
NULL
,
0
,
&
sse_sw
,
_MCW_EM
);
flags
|=
sse_sw
;
}
#elif defined(__x86_64__) || defined(__aarch64__) || (defined(__arm__) && !defined(__SOFTFP__))
_setfp
(
NULL
,
0
,
&
flags
,
_MCW_EM
);
#else
FIXME
(
"not implemented
\n
"
);
_setfp
(
NULL
,
0
,
&
flags
,
_MCW_EM
);
#endif
return
flags
;
}
...
...
@@ -5654,11 +5646,9 @@ unsigned int CDECL _control87(unsigned int newval, unsigned int mask)
if
((
flags
^
sse2_cw
)
&
(
_MCW_EM
|
_MCW_RC
))
flags
|=
_EM_AMBIGUOUS
;
flags
|=
sse2_cw
;
#el
if defined(__x86_64__) || defined(__aarch64__) || (defined(__arm__) && !defined(__SOFTFP__))
#el
se
flags
=
newval
;
_setfp
(
&
flags
,
mask
,
NULL
,
0
);
#else
FIXME
(
"not implemented
\n
"
);
#endif
return
flags
;
}
...
...
@@ -5803,7 +5793,6 @@ static __msvcrt_ulong fenv_encode(unsigned int x, unsigned int y)
return
x
|
y
;
}
#if defined(__i386__) || defined(__x86_64__) || defined(__aarch64__) || (defined(__arm__) && !defined(__SOFTFP__))
static
BOOL
fenv_decode
(
__msvcrt_ulong
enc
,
unsigned
int
*
x
,
unsigned
int
*
y
)
{
if
(
enc
&
0x20
)
...
...
@@ -5813,7 +5802,6 @@ static BOOL fenv_decode(__msvcrt_ulong enc, unsigned int *x, unsigned int *y)
return
TRUE
;
}
#endif
#endif
#if _MSVCR_VER>=120
/*********************************************************************
...
...
@@ -6008,7 +5996,6 @@ void CDECL _fpreset(void)
*/
int
CDECL
fesetenv
(
const
fenv_t
*
env
)
{
#if defined(__i386__) || defined(__x86_64__) || defined(__aarch64__) || (defined(__arm__) && !defined(__SOFTFP__))
unsigned
int
x87_cw
,
cw
,
x87_stat
,
stat
;
unsigned
int
mask
;
...
...
@@ -6045,10 +6032,6 @@ int CDECL fesetenv(const fenv_t *env)
return
1
;
return
0
;
#endif
#else
FIXME
(
"not implemented
\n
"
);
return
1
;
#endif
}
#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