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,
...
@@ -5235,12 +5235,10 @@ static BOOL _setfp_sse( unsigned int *cw, unsigned int cw_mask,
}
}
#endif
#endif
#if defined(__i386__) || defined(__x86_64__) || defined(__aarch64__) || (defined(__arm__) && !defined(__SOFTFP__))
static
BOOL
_setfp
(
unsigned
int
*
cw
,
unsigned
int
cw_mask
,
static
BOOL
_setfp
(
unsigned
int
*
cw
,
unsigned
int
cw_mask
,
unsigned
int
*
sw
,
unsigned
int
sw_mask
)
unsigned
int
*
sw
,
unsigned
int
sw_mask
)
{
{
#if defined(__GNUC__) || defined(__clang__)
#if (defined(__GNUC__) || defined(__clang__)) && defined(__i386__)
#ifdef __i386__
unsigned
long
oldcw
=
0
,
newcw
=
0
;
unsigned
long
oldcw
=
0
,
newcw
=
0
;
unsigned
long
oldsw
=
0
,
newsw
=
0
;
unsigned
long
oldsw
=
0
,
newsw
=
0
;
unsigned
int
flags
;
unsigned
int
flags
;
...
@@ -5503,7 +5501,6 @@ static BOOL _setfp( unsigned int *cw, unsigned int cw_mask,
...
@@ -5503,7 +5501,6 @@ static BOOL _setfp( unsigned int *cw, unsigned int cw_mask,
if
(
old_fpscr
!=
fpscr
)
if
(
old_fpscr
!=
fpscr
)
__asm__
__volatile__
(
"vmsr fpscr, %0"
::
"r"
(
fpscr
)
);
__asm__
__volatile__
(
"vmsr fpscr, %0"
::
"r"
(
fpscr
)
);
return
TRUE
;
return
TRUE
;
#endif
#else
#else
FIXME
(
"not implemented
\n
"
);
FIXME
(
"not implemented
\n
"
);
if
(
cw
)
*
cw
=
0
;
if
(
cw
)
*
cw
=
0
;
...
@@ -5511,7 +5508,6 @@ static BOOL _setfp( unsigned int *cw, unsigned int cw_mask,
...
@@ -5511,7 +5508,6 @@ static BOOL _setfp( unsigned int *cw, unsigned int cw_mask,
return
FALSE
;
return
FALSE
;
#endif
#endif
}
}
#endif
/**********************************************************************
/**********************************************************************
* _statusfp2 (MSVCR80.@)
* _statusfp2 (MSVCR80.@)
...
@@ -5540,10 +5536,8 @@ unsigned int CDECL _statusfp(void)
...
@@ -5540,10 +5536,8 @@ unsigned int CDECL _statusfp(void)
_statusfp2
(
&
x86_sw
,
&
sse2_sw
);
_statusfp2
(
&
x86_sw
,
&
sse2_sw
);
/* FIXME: there's no definition for ambiguous status, just return all status bits for now */
/* FIXME: there's no definition for ambiguous status, just return all status bits for now */
flags
=
x86_sw
|
sse2_sw
;
flags
=
x86_sw
|
sse2_sw
;
#elif defined(__x86_64__) || defined(__aarch64__) || (defined(__arm__) && !defined(__SOFTFP__))
_setfp
(
NULL
,
0
,
&
flags
,
0
);
#else
#else
FIXME
(
"not implemented
\n
"
);
_setfp
(
NULL
,
0
,
&
flags
,
0
);
#endif
#endif
return
flags
;
return
flags
;
}
}
...
@@ -5563,10 +5557,8 @@ unsigned int CDECL _clearfp(void)
...
@@ -5563,10 +5557,8 @@ unsigned int CDECL _clearfp(void)
_setfp_sse
(
NULL
,
0
,
&
sse_sw
,
_MCW_EM
);
_setfp_sse
(
NULL
,
0
,
&
sse_sw
,
_MCW_EM
);
flags
|=
sse_sw
;
flags
|=
sse_sw
;
}
}
#elif defined(__x86_64__) || defined(__aarch64__) || (defined(__arm__) && !defined(__SOFTFP__))
_setfp
(
NULL
,
0
,
&
flags
,
_MCW_EM
);
#else
#else
FIXME
(
"not implemented
\n
"
);
_setfp
(
NULL
,
0
,
&
flags
,
_MCW_EM
);
#endif
#endif
return
flags
;
return
flags
;
}
}
...
@@ -5654,11 +5646,9 @@ unsigned int CDECL _control87(unsigned int newval, unsigned int mask)
...
@@ -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
;
if
((
flags
^
sse2_cw
)
&
(
_MCW_EM
|
_MCW_RC
))
flags
|=
_EM_AMBIGUOUS
;
flags
|=
sse2_cw
;
flags
|=
sse2_cw
;
#el
if defined(__x86_64__) || defined(__aarch64__) || (defined(__arm__) && !defined(__SOFTFP__))
#el
se
flags
=
newval
;
flags
=
newval
;
_setfp
(
&
flags
,
mask
,
NULL
,
0
);
_setfp
(
&
flags
,
mask
,
NULL
,
0
);
#else
FIXME
(
"not implemented
\n
"
);
#endif
#endif
return
flags
;
return
flags
;
}
}
...
@@ -5803,7 +5793,6 @@ static __msvcrt_ulong fenv_encode(unsigned int x, unsigned int y)
...
@@ -5803,7 +5793,6 @@ static __msvcrt_ulong fenv_encode(unsigned int x, unsigned int y)
return
x
|
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
)
static
BOOL
fenv_decode
(
__msvcrt_ulong
enc
,
unsigned
int
*
x
,
unsigned
int
*
y
)
{
{
if
(
enc
&
0x20
)
if
(
enc
&
0x20
)
...
@@ -5813,7 +5802,6 @@ static BOOL fenv_decode(__msvcrt_ulong enc, unsigned int *x, unsigned int *y)
...
@@ -5813,7 +5802,6 @@ static BOOL fenv_decode(__msvcrt_ulong enc, unsigned int *x, unsigned int *y)
return
TRUE
;
return
TRUE
;
}
}
#endif
#endif
#endif
#if _MSVCR_VER>=120
#if _MSVCR_VER>=120
/*********************************************************************
/*********************************************************************
...
@@ -6008,7 +5996,6 @@ void CDECL _fpreset(void)
...
@@ -6008,7 +5996,6 @@ void CDECL _fpreset(void)
*/
*/
int
CDECL
fesetenv
(
const
fenv_t
*
env
)
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
x87_cw
,
cw
,
x87_stat
,
stat
;
unsigned
int
mask
;
unsigned
int
mask
;
...
@@ -6045,10 +6032,6 @@ int CDECL fesetenv(const fenv_t *env)
...
@@ -6045,10 +6032,6 @@ int CDECL fesetenv(const fenv_t *env)
return
1
;
return
1
;
return
0
;
return
0
;
#endif
#endif
#else
FIXME
(
"not implemented
\n
"
);
return
1
;
#endif
}
}
#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