mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 13:35:47 +00:00
[CRT] Fix amd64 floating point control functions
This commit is contained in:
parent
39f11249ff
commit
76086220fa
10 changed files with 243 additions and 32 deletions
23
sdk/lib/crt/float/amd64/_clearfp.c
Normal file
23
sdk/lib/crt/float/amd64/_clearfp.c
Normal file
|
@ -0,0 +1,23 @@
|
|||
/*
|
||||
* PROJECT: ReactOS CRT
|
||||
* LICENSE: MIT (https://spdx.org/licenses/MIT)
|
||||
* PURPOSE: x64 implementation of _clearfp
|
||||
* COPYRIGHT: Copyright 2022 Timo Kreuzer <timo.kreuzer@reactos.org>
|
||||
*/
|
||||
|
||||
#include <float.h>
|
||||
#include <xmmintrin.h>
|
||||
|
||||
unsigned int __cdecl _clearfp(void)
|
||||
{
|
||||
unsigned int retval;
|
||||
|
||||
/* Get current status value */
|
||||
retval = _statusfp();
|
||||
|
||||
/* Clear the exception mask */
|
||||
_mm_setcsr(_mm_getcsr() & ~_MM_EXCEPT_MASK);
|
||||
|
||||
/* Return the previous state */
|
||||
return retval;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue