Piotr Caban : msvcr110: Add __libm_sse2_sqrt_precise implementation.
Alexandre Julliard
julliard at winehq.org
Tue Jan 7 13:21:18 CST 2014
Module: wine
Branch: master
Commit: 07566faaca053d7b2c9915e9a2bd20fdf51ba81f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=07566faaca053d7b2c9915e9a2bd20fdf51ba81f
Author: Piotr Caban <piotr at codeweavers.com>
Date: Tue Jan 7 15:47:34 2014 +0100
msvcr110: Add __libm_sse2_sqrt_precise implementation.
---
dlls/msvcr110/msvcr110.spec | 2 +-
dlls/msvcrt/math.c | 9 +++++++++
dlls/msvcrt/msvcrt.spec | 1 +
3 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/dlls/msvcr110/msvcr110.spec b/dlls/msvcr110/msvcr110.spec
index ba588f9..9b3ebe8 100644
--- a/dlls/msvcr110/msvcr110.spec
+++ b/dlls/msvcr110/msvcr110.spec
@@ -1394,7 +1394,7 @@
@ cdecl -arch=i386 _libm_sse2_log_precise() msvcrt.__libm_sse2_log
@ cdecl -arch=i386 _libm_sse2_pow_precise() msvcrt.__libm_sse2_pow
@ cdecl -arch=i386 _libm_sse2_sin_precise() msvcrt.__libm_sse2_sin
-@ stub -arch=i386 _libm_sse2_sqrt_precise
+@ cdecl -arch=i386 _libm_sse2_sqrt_precise() msvcrt.__libm_sse2_sqrt_precise
@ cdecl -arch=i386 _libm_sse2_tan_precise() msvcrt.__libm_sse2_tan
@ cdecl _loaddll(str) msvcrt._loaddll
@ cdecl -arch=x86_64 _local_unwind(ptr ptr) msvcrt._local_unwind
diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c
index 6bcc2b7..6af8776 100644
--- a/dlls/msvcrt/math.c
+++ b/dlls/msvcrt/math.c
@@ -2185,4 +2185,13 @@ void __cdecl __libm_sse2_tanf(void)
__asm__ __volatile__( "movd %0,%%xmm0" : : "g" (f) );
}
+/* __libm_sse2_sqrt_precise */
+void __cdecl __libm_sse2_sqrt_precise(void)
+{
+ double d;
+ __asm__ __volatile__( "movd %%xmm0,%0" : "=m" (d) );
+ d = sqrt( d );
+ __asm__ __volatile__( "movd %0,%%xmm0" : : "m" (d) );
+}
+
#endif /* __i386__ */
diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec
index e482784..fa458a4 100644
--- a/dlls/msvcrt/msvcrt.spec
+++ b/dlls/msvcrt/msvcrt.spec
@@ -1538,3 +1538,4 @@
@ cdecl _fstat32(long ptr)
@ cdecl _fstat64i32(long ptr)
@ cdecl _is_exception_typeof(ptr ptr)
+@ cdecl -arch=i386 __libm_sse2_sqrt_precise()
More information about the wine-cvs
mailing list