[PATCH 0/1] MR5837: msvcrt: Fix _libm_sse2_sqrt_precise not using SSE2 sqrt
See [bug 56824](https://bugs.winehq.org/show_bug.cgi?id=56824) Commit 2fc773199080dedbe64a33ef66be02a4f44bcd08 unified the sqrt handling across architectures, this lead to _libm_sse2_sqrt_precise calling the x87 version instead of the SSE2 version. I don't think we need to do a call at all, this function is i386 exclusive, so just use the SSE2 instruction for sqrt directly. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/5837
From: Fabian Maurer <dark.shadow4(a)web.de> Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56824 --- dlls/msvcrt/math.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c index 738d4138c99..6624696c30f 100644 --- a/dlls/msvcrt/math.c +++ b/dlls/msvcrt/math.c @@ -2568,7 +2568,7 @@ void __cdecl __libm_sse2_sqrt_precise(void) __asm__ __volatile__( "movq %0,%%xmm0" : : "m" (d) ); return; } - __asm__ __volatile__( "call " __ASM_NAME( "asm_sqrt" ) ); + __asm__ __volatile__( "sqrtsd %xmm0, %xmm0" ); } #endif /* __i386__ */ -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/5837
Thanks, it also fixes [my bug](https://bugs.winehq.org/show_bug.cgi?id=56826)! -- https://gitlab.winehq.org/wine/wine/-/merge_requests/5837#note_72999
This merge request was approved by Piotr Caban. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/5837
participants (4)
-
Fabian Maurer -
Fabian Maurer (@DarkShadow44) -
Piotr Caban (@piotr) -
Zsolt Vadász