Piotr Caban : msvcrt: Don't check x87 status word in x86_64 _statusfp.

Alexandre Julliard julliard at winehq.org
Wed Aug 4 16:41:38 CDT 2021


Module: wine
Branch: master
Commit: ab3afe8347d55e2f0fed39da9277ae29192260e6
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=ab3afe8347d55e2f0fed39da9277ae29192260e6

Author: Piotr Caban <piotr at codeweavers.com>
Date:   Wed Aug  4 18:04:46 2021 +0200

msvcrt: Don't check x87 status word in x86_64 _statusfp.

Signed-off-by: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/msvcrt/math.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c
index c8a666568de..ce85cb0da43 100644
--- a/dlls/msvcrt/math.c
+++ b/dlls/msvcrt/math.c
@@ -5236,11 +5236,9 @@ static BOOL _setfp_sse( unsigned int *cw, unsigned int cw_mask,
 #endif
 
 /**********************************************************************
- *		_statusfp2 (MSVCRT.@)
- *
- * Not exported by native msvcrt, added in msvcr80.
+ *		_statusfp2 (MSVCR80.@)
  */
-#if defined(__i386__) || defined(__x86_64__)
+#if defined(__i386__)
 void CDECL _statusfp2( unsigned int *x86_sw, unsigned int *sse2_sw )
 {
 #if defined(__GNUC__) || defined(__clang__)
@@ -5277,12 +5275,14 @@ void CDECL _statusfp2( unsigned int *x86_sw, unsigned int *sse2_sw )
 unsigned int CDECL _statusfp(void)
 {
     unsigned int flags = 0;
-#if defined(__i386__) || defined(__x86_64__)
+#if defined(__i386__)
     unsigned int x86_sw, sse2_sw;
 
     _statusfp2( &x86_sw, &sse2_sw );
     /* FIXME: there's no definition for ambiguous status, just return all status bits for now */
     flags = x86_sw | sse2_sw;
+#elif defined(__x86_64__)
+    _setfp_sse(NULL, 0, &flags, 0);
 #elif defined(__aarch64__)
     ULONG_PTR fpsr;
 




More information about the wine-cvs mailing list