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
aa4d70b5
Commit
aa4d70b5
authored
Apr 10, 2023
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Use the sin() implementation from the bundled musl library.
parent
1546ef30
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
41 deletions
+6
-41
Makefile.in
dlls/ntdll/Makefile.in
+1
-1
math.c
dlls/ntdll/math.c
+5
-40
No files found.
dlls/ntdll/Makefile.in
View file @
aa4d70b5
...
...
@@ -2,7 +2,7 @@ EXTRADEFS = -D_NTSYSTEM_ -D_ACRTIMP= -DWINBASEAPI=
MODULE
=
ntdll.dll
UNIXLIB
=
ntdll.so
IMPORTLIB
=
ntdll
IMPORTS
=
winecrt0
IMPORTS
=
$(MUSL_PE_LIBS)
winecrt0
UNIX_CFLAGS
=
$(UNWIND_CFLAGS)
UNIX_LIBS
=
$(IOKIT_LIBS)
$(COREFOUNDATION_LIBS)
$(CORESERVICES_LIBS)
$(RT_LIBS)
$(PTHREAD_LIBS)
$(UNWIND_LIBS)
$(I386_LIBS)
$(PROCSTAT_LIBS)
...
...
dlls/ntdll/math.c
View file @
aa4d70b5
...
...
@@ -42,6 +42,11 @@
#define WIN32_NO_STATUS
#include "ntdll_misc.h"
double
math_error
(
int
type
,
const
char
*
name
,
double
arg1
,
double
arg2
,
double
retval
)
{
return
retval
;
}
/* Copied from musl: src/internal/libm.h */
static
inline
float
fp_barrierf
(
float
x
)
{
...
...
@@ -1819,46 +1824,6 @@ double CDECL pow( double x, double y )
}
/*********************************************************************
* sin (NTDLL.@)
*
* Copied from musl: src/math/sin.c
*/
double
CDECL
sin
(
double
x
)
{
double
y
[
2
];
UINT32
ix
;
unsigned
n
;
ix
=
*
(
ULONGLONG
*
)
&
x
>>
32
;
ix
&=
0x7fffffff
;
/* |x| ~< pi/4 */
if
(
ix
<=
0x3fe921fb
)
{
if
(
ix
<
0x3e500000
)
{
/* |x| < 2**-26 */
/* raise inexact if x != 0 and underflow if subnormal*/
fp_barrier
(
ix
<
0x00100000
?
x
/
0x1
p120f
:
x
+
0x1
p120f
);
return
x
;
}
return
__sin
(
x
,
0
.
0
,
0
);
}
/* sin(Inf or NaN) is NaN */
if
(
isinf
(
x
))
return
x
-
x
;
if
(
ix
>=
0x7ff00000
)
return
x
-
x
;
/* argument reduction needed */
n
=
__rem_pio2
(
x
,
y
);
switch
(
n
&
3
)
{
case
0
:
return
__sin
(
y
[
0
],
y
[
1
],
1
);
case
1
:
return
__cos
(
y
[
0
],
y
[
1
]);
case
2
:
return
-
__sin
(
y
[
0
],
y
[
1
],
1
);
default:
return
-
__cos
(
y
[
0
],
y
[
1
]);
}
}
/*********************************************************************
* sqrt (NTDLL.@)
*
* Copied from musl: src/math/sqrt.c
...
...
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