Martin Storsjö : msvcrt: Implement _statusfp for arm.

Alexandre Julliard julliard at winehq.org
Tue Aug 3 16:52:24 CDT 2021


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

Author: Martin Storsjö <martin at martin.st>
Date:   Tue Aug  3 15:56:10 2021 +0300

msvcrt: Implement _statusfp for arm.

Signed-off-by: Martin Storsjö <martin at martin.st>
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, 10 insertions(+)

diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c
index 05eacbb36fb..01b3e7002a6 100644
--- a/dlls/msvcrt/math.c
+++ b/dlls/msvcrt/math.c
@@ -5203,6 +5203,16 @@ unsigned int CDECL _statusfp(void)
     if (fpsr & 0x8)  flags |= _SW_UNDERFLOW;
     if (fpsr & 0x10) flags |= _SW_INEXACT;
     if (fpsr & 0x80) flags |= _SW_DENORMAL;
+#elif defined(__arm__) && !defined(__SOFTFP__)
+    DWORD fpscr;
+
+    __asm__ __volatile__( "vmrs %0, fpscr" : "=r" (fpscr) );
+    if (fpscr & 0x1)  flags |= _SW_INVALID;
+    if (fpscr & 0x2)  flags |= _SW_ZERODIVIDE;
+    if (fpscr & 0x4)  flags |= _SW_OVERFLOW;
+    if (fpscr & 0x8)  flags |= _SW_UNDERFLOW;
+    if (fpscr & 0x10) flags |= _SW_INEXACT;
+    if (fpscr & 0x80) flags |= _SW_DENORMAL;
 #else
     FIXME( "not implemented\n" );
 #endif




More information about the wine-cvs mailing list