mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 06:05:48 +00:00
[CRT/ARM] Floating point control functions implementation (#3870)
Implement controlfp, statusfp, fpreset, clearfp. CORE-17757 CORE-17604
This commit is contained in:
parent
c188821f8b
commit
554bbb6bab
13 changed files with 249 additions and 100 deletions
22
sdk/lib/crt/float/arm/_clearfp.c
Normal file
22
sdk/lib/crt/float/arm/_clearfp.c
Normal file
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
* PROJECT: ReactOS CRT library
|
||||
* LICENSE: MIT (https://spdx.org/licenses/MIT)
|
||||
* PURPOSE: Implementation of _clearfp
|
||||
* COPYRIGHT: Copyright 2021 Roman Masanin <36927roma@gmail.com>
|
||||
*/
|
||||
|
||||
#include "fpscr.h"
|
||||
|
||||
unsigned int _clearfp(void)
|
||||
{
|
||||
ARM_FPSCR fpscr;
|
||||
unsigned int status;
|
||||
|
||||
fpscr.raw = __getfp();
|
||||
status = _statusfp();
|
||||
|
||||
fpscr.data.exception = fpscr.data.exception & ~ARM_CW_STATUS_MASK;
|
||||
|
||||
__setfp(fpscr.raw);
|
||||
return status;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue