xref: /reactos/sdk/lib/crt/float/arm/_clearfp.c (revision 9393fc32)
1 /*
2  * PROJECT:     ReactOS CRT library
3  * LICENSE:     MIT (https://spdx.org/licenses/MIT)
4  * PURPOSE:     Implementation of _clearfp
5  * COPYRIGHT:   Copyright 2021 Roman Masanin <36927roma@gmail.com>
6  */
7 
8 #include "fpscr.h"
9 
10 unsigned int _clearfp(void)
11 {
12     ARM_FPSCR fpscr;
13     unsigned int status;
14 
15     fpscr.raw = __getfp();
16     status = _statusfp();
17 
18     fpscr.data.exception = fpscr.data.exception & ~ARM_CW_STATUS_MASK;
19 
20     __setfp(fpscr.raw);
21     return status;
22 }
23