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
e5ddf0e8
Commit
e5ddf0e8
authored
May 17, 2021
by
Piotr Caban
Committed by
Alexandre Julliard
May 17, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Import floorf implementation from musl.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
bba43bd6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
11 deletions
+22
-11
math.c
dlls/msvcrt/math.c
+22
-1
unixlib.c
dlls/msvcrt/unixlib.c
+0
-9
unixlib.h
dlls/msvcrt/unixlib.h
+0
-1
No files found.
dlls/msvcrt/math.c
View file @
e5ddf0e8
...
...
@@ -827,10 +827,31 @@ float CDECL ceilf( float x )
/*********************************************************************
* floorf (MSVCRT.@)
*
* Copied from musl: src/math/floorf.c
*/
float
CDECL
floorf
(
float
x
)
{
return
unix_funcs
->
floorf
(
x
);
union
{
float
f
;
UINT32
i
;}
u
=
{
x
};
int
e
=
(
int
)(
u
.
i
>>
23
&
0xff
)
-
0x7f
;
UINT32
m
;
if
(
e
>=
23
)
return
x
;
if
(
e
>=
0
)
{
m
=
0x007fffff
>>
e
;
if
((
u
.
i
&
m
)
==
0
)
return
x
;
if
(
u
.
i
>>
31
)
u
.
i
+=
m
;
u
.
i
&=
~
m
;
}
else
{
if
(
u
.
i
>>
31
==
0
)
return
0
;
else
if
(
u
.
i
<<
1
)
return
-
1
;
}
return
u
.
f
;
}
/*********************************************************************
...
...
dlls/msvcrt/unixlib.c
View file @
e5ddf0e8
...
...
@@ -282,14 +282,6 @@ static double CDECL unix_floor( double x )
}
/*********************************************************************
* floorf
*/
static
float
CDECL
unix_floorf
(
float
x
)
{
return
floorf
(
x
);
}
/*********************************************************************
* fma
*/
static
double
CDECL
unix_fma
(
double
x
,
double
y
,
double
z
)
...
...
@@ -712,7 +704,6 @@ static const struct unix_funcs funcs =
unix_expm1
,
unix_expm1f
,
unix_floor
,
unix_floorf
,
unix_fma
,
unix_fmaf
,
unix_fmod
,
...
...
dlls/msvcrt/unixlib.h
View file @
e5ddf0e8
...
...
@@ -44,7 +44,6 @@ struct unix_funcs
double
(
CDECL
*
expm1
)(
double
x
);
float
(
CDECL
*
expm1f
)(
float
x
);
double
(
CDECL
*
floor
)(
double
x
);
float
(
CDECL
*
floorf
)(
float
x
);
double
(
CDECL
*
fma
)(
double
x
,
double
y
,
double
z
);
float
(
CDECL
*
fmaf
)(
float
x
,
float
y
,
float
z
);
double
(
CDECL
*
fmod
)(
double
x
,
double
y
);
...
...
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