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
82563ede
Commit
82563ede
authored
Mar 31, 2023
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Use the asin() implementation from the bundled musl library.
parent
938acddb
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
27 additions
and
91 deletions
+27
-91
crtdll.spec
dlls/crtdll/crtdll.spec
+1
-1
msvcr100.spec
dlls/msvcr100/msvcr100.spec
+1
-1
msvcr110.spec
dlls/msvcr110/msvcr110.spec
+1
-1
msvcr120.spec
dlls/msvcr120/msvcr120.spec
+1
-1
msvcr70.spec
dlls/msvcr70/msvcr70.spec
+1
-1
msvcr71.spec
dlls/msvcr71/msvcr71.spec
+1
-1
msvcr80.spec
dlls/msvcr80/msvcr80.spec
+1
-1
msvcr90.spec
dlls/msvcr90/msvcr90.spec
+1
-1
math.c
dlls/msvcrt/math.c
+14
-78
msvcrt.spec
dlls/msvcrt/msvcrt.spec
+1
-1
msvcrtd.spec
dlls/msvcrtd/msvcrtd.spec
+1
-1
ucrtbase.spec
dlls/ucrtbase/ucrtbase.spec
+2
-2
asin.c
libs/musl/src/math/asin.c
+1
-1
No files found.
dlls/crtdll/crtdll.spec
View file @
82563ede
...
...
@@ -346,7 +346,7 @@
@ cdecl abs(long)
@ cdecl acos(double)
@ cdecl asctime(ptr)
@ cdecl asin(double)
@ cdecl asin(double)
MSVCRT_asin
@ cdecl atan(double)
@ cdecl atan2(double double)
@ cdecl -private atexit(ptr) MSVCRT_atexit
...
...
dlls/msvcr100/msvcr100.spec
View file @
82563ede
...
...
@@ -1630,7 +1630,7 @@
@ cdecl -arch=!i386 acosf(float)
@ cdecl asctime(ptr)
@ cdecl asctime_s(ptr long ptr)
@ cdecl asin(double)
@ cdecl asin(double)
MSVCRT_asin
@ cdecl -arch=!i386 asinf(float)
@ cdecl atan(double)
@ cdecl -arch=!i386 atanf(float)
...
...
dlls/msvcr110/msvcr110.spec
View file @
82563ede
...
...
@@ -1987,7 +1987,7 @@
@ cdecl -arch=!i386 acosf(float)
@ cdecl asctime(ptr)
@ cdecl asctime_s(ptr long ptr)
@ cdecl asin(double)
@ cdecl asin(double)
MSVCRT_asin
@ cdecl -arch=!i386 asinf(float)
@ cdecl atan(double)
@ cdecl -arch=!i386 atanf(float)
...
...
dlls/msvcr120/msvcr120.spec
View file @
82563ede
...
...
@@ -2017,7 +2017,7 @@
@ cdecl acoshl(double) acosh
@ cdecl asctime(ptr)
@ cdecl asctime_s(ptr long ptr)
@ cdecl asin(double)
@ cdecl asin(double)
MSVCRT_asin
@ cdecl -arch=!i386 asinf(float)
@ cdecl asinh(double)
@ cdecl asinhf(float)
...
...
dlls/msvcr70/msvcr70.spec
View file @
82563ede
...
...
@@ -688,7 +688,7 @@
@ cdecl abs(long)
@ cdecl acos(double)
@ cdecl asctime(ptr)
@ cdecl asin(double)
@ cdecl asin(double)
MSVCRT_asin
@ cdecl atan(double)
@ cdecl atan2(double double)
@ cdecl -private atexit(ptr) MSVCRT_atexit # not imported to avoid conflicts with Mingw
...
...
dlls/msvcr71/msvcr71.spec
View file @
82563ede
...
...
@@ -684,7 +684,7 @@
@ cdecl abs(long)
@ cdecl acos(double)
@ cdecl asctime(ptr)
@ cdecl asin(double)
@ cdecl asin(double)
MSVCRT_asin
@ cdecl atan(double)
@ cdecl atan2(double double)
@ cdecl -private atexit(ptr) MSVCRT_atexit # not imported to avoid conflicts with Mingw
...
...
dlls/msvcr80/msvcr80.spec
View file @
82563ede
...
...
@@ -1313,7 +1313,7 @@
@ cdecl -arch=!i386 acosf(float)
@ cdecl asctime(ptr)
@ cdecl asctime_s(ptr long ptr)
@ cdecl asin(double)
@ cdecl asin(double)
MSVCRT_asin
@ cdecl -arch=!i386 asinf(float)
@ cdecl atan(double)
@ cdecl -arch=!i386 atanf(float)
...
...
dlls/msvcr90/msvcr90.spec
View file @
82563ede
...
...
@@ -1285,7 +1285,7 @@
@ cdecl -arch=!i386 acosf(float)
@ cdecl asctime(ptr)
@ cdecl asctime_s(ptr long ptr)
@ cdecl asin(double)
@ cdecl asin(double)
MSVCRT_asin
@ cdecl atan(double)
@ cdecl atan2(double double)
@ cdecl -arch=!i386 asinf(float)
...
...
dlls/msvcrt/math.c
View file @
82563ede
...
...
@@ -445,29 +445,7 @@ float CDECL tanhf( float x )
/*********************************************************************
* asin (MSVCRT.@)
*
* Copied from musl: src/math/asin.c
*/
static
double
asin_R
(
double
z
)
{
/* coefficients for R(x^2) */
static
const
double
pS0
=
1.66666666666666657415e-01
,
pS1
=
-
3.25565818622400915405e-01
,
pS2
=
2.01212532134862925881e-01
,
pS3
=
-
4.00555345006794114027e-02
,
pS4
=
7.91534994289814532176e-04
,
pS5
=
3.47933107596021167570e-05
,
qS1
=
-
2.40339491173441421878e+00
,
qS2
=
2.02094576023350569471e+00
,
qS3
=
-
6.88283971605453293030e-01
,
qS4
=
7.70381505559019352791e-02
;
double
p
,
q
;
p
=
z
*
(
pS0
+
z
*
(
pS1
+
z
*
(
pS2
+
z
*
(
pS3
+
z
*
(
pS4
+
z
*
pS5
)))));
q
=
1
.
0
+
z
*
(
qS1
+
z
*
(
qS2
+
z
*
(
qS3
+
z
*
qS4
)));
return
p
/
q
;
}
#ifdef __i386__
double
CDECL
x87_asin
(
double
);
__ASM_GLOBAL_FUNC
(
x87_asin
,
...
...
@@ -485,70 +463,28 @@ __ASM_GLOBAL_FUNC( x87_asin,
"ret"
)
#endif
double
CDECL
asin
(
double
x
)
double
CDECL
MSVCRT_
asin
(
double
x
)
{
static
const
double
pio2_hi
=
1.57079632679489655800e+00
,
pio2_lo
=
6.12323399573676603587e-17
;
double
z
,
r
,
s
;
unsigned
int
hx
,
ix
;
ULONGLONG
llx
;
#ifdef __i386__
unsigned
int
x87_cw
,
sse2_cw
;
#endif
unsigned
int
hx
=
*
(
ULONGLONG
*
)
&
x
>>
32
;
unsigned
int
ix
=
hx
&
0x7fffffff
;
hx
=
*
(
ULONGLONG
*
)
&
x
>>
32
;
ix
=
hx
&
0x7fffffff
;
/* |x| >= 1 or nan */
if
(
ix
>=
0x3ff00000
)
{
unsigned
int
lx
;
lx
=
*
(
ULONGLONG
*
)
&
x
;
if
(((
ix
-
0x3ff00000
)
|
lx
)
==
0
)
/* asin(1) = +-pi/2 with inexact */
return
x
*
pio2_hi
+
7.5231638452626401e-37
;
if
(
isnan
(
x
))
{
#ifdef __i386__
return
math_error
(
_DOMAIN
,
"asin"
,
x
,
0
,
x
);
#else
return
x
;
#endif
}
return
math_error
(
_DOMAIN
,
"asin"
,
x
,
0
,
0
/
(
x
-
x
));
}
if
(
isnan
(
x
))
return
math_error
(
_DOMAIN
,
"asin"
,
x
,
0
,
x
);
#ifdef __i386__
__control87_2
(
0
,
0
,
&
x87_cw
,
&
sse2_cw
);
if
(
!
sse2_enabled
||
(
x87_cw
&
_MCW_EM
)
!=
_MCW_EM
/* |x| < 1 */
if
(
ix
<
0x3ff00000
)
{
__control87_2
(
0
,
0
,
&
x87_cw
,
&
sse2_cw
);
if
(
!
sse2_enabled
||
(
x87_cw
&
_MCW_EM
)
!=
_MCW_EM
||
(
sse2_cw
&
(
_MCW_EM
|
_MCW_RC
))
!=
_MCW_EM
)
return
x87_asin
(
x
);
return
x87_asin
(
x
);
}
#else
if
(
isnan
(
x
))
return
x
;
#endif
/* |x| < 0.5 */
if
(
ix
<
0x3fe00000
)
{
/* if 0x1p-1022 <= |x| < 0x1p-26, avoid raising underflow */
if
(
ix
<
0x3e500000
&&
ix
>=
0x00100000
)
return
x
;
return
x
+
x
*
asin_R
(
x
*
x
);
}
/* 1 > |x| >= 0.5 */
z
=
(
1
-
fabs
(
x
))
*
0
.
5
;
s
=
sqrt
(
z
);
r
=
asin_R
(
z
);
if
(
ix
>=
0x3fef3333
)
{
/* if |x| > 0.975 */
x
=
pio2_hi
-
(
2
*
(
s
+
s
*
r
)
-
pio2_lo
);
}
else
{
double
f
,
c
;
/* f+c = sqrt(z) */
f
=
s
;
llx
=
(
*
(
ULONGLONG
*
)
&
f
>>
32
)
<<
32
;
f
=
*
(
double
*
)
&
llx
;
c
=
(
z
-
f
*
f
)
/
(
s
+
f
);
x
=
0
.
5
*
pio2_hi
-
(
2
*
s
*
r
-
(
pio2_lo
-
2
*
c
)
-
(
0
.
5
*
pio2_hi
-
2
*
f
));
}
if
(
hx
>>
31
)
return
-
x
;
return
x
;
return
asin
(
x
);
}
/*********************************************************************
...
...
dlls/msvcrt/msvcrt.spec
View file @
82563ede
...
...
@@ -1253,7 +1253,7 @@
@ cdecl -arch=!i386 acosf(float)
@ cdecl asctime(ptr)
@ cdecl asctime_s(ptr long ptr)
@ cdecl asin(double)
@ cdecl asin(double)
MSVCRT_asin
@ cdecl atan(double)
@ cdecl atan2(double double)
@ cdecl -arch=!i386 asinf(float)
...
...
dlls/msvcrtd/msvcrtd.spec
View file @
82563ede
...
...
@@ -641,7 +641,7 @@
@ cdecl abs(long)
@ cdecl acos(double)
@ cdecl asctime(ptr)
@ cdecl asin(double)
@ cdecl asin(double)
MSVCRT_asin
@ cdecl atan(double)
@ cdecl atan2(double double)
@ cdecl -private atexit(ptr) MSVCRT_atexit
...
...
dlls/ucrtbase/ucrtbase.spec
View file @
82563ede
...
...
@@ -1567,7 +1567,7 @@
@ cdecl _o_acoshl(double) acosh
@ cdecl _o_asctime(ptr) asctime
@ cdecl _o_asctime_s(ptr long ptr) asctime_s
@ cdecl _o_asin(double) asin
@ cdecl _o_asin(double)
MSVCRT_
asin
@ cdecl -arch=!i386 _o_asinf(float) asinf
@ cdecl _o_asinh(double) asinh
@ cdecl _o_asinhf(float) asinhf
...
...
@@ -2161,7 +2161,7 @@
@ cdecl acoshl(double) acosh
@ cdecl asctime(ptr)
@ cdecl asctime_s(ptr long ptr)
@ cdecl asin(double)
@ cdecl asin(double)
MSVCRT_asin
@ cdecl -arch=!i386 asinf(float)
@ cdecl asinh(double)
@ cdecl asinhf(float)
...
...
libs/musl/src/math/asin.c
View file @
82563ede
...
...
@@ -78,7 +78,7 @@ double __cdecl asin(double x)
if
((
ix
-
0x3ff00000
|
lx
)
==
0
)
/* asin(1) = +-pi/2 with inexact */
return
x
*
pio2_hi
+
0x1
p
-
120
f
;
return
0
/
(
x
-
x
);
return
math_error
(
_DOMAIN
,
"asin"
,
x
,
0
,
0
/
(
x
-
x
)
);
}
/* |x| < 0.5 */
if
(
ix
<
0x3fe00000
)
{
...
...
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