[libc][Obvious] Fix typo in implementation of aarch64 clearExcept.

Instead of reading and updating the status word, control word was being
updated.
This commit is contained in:
Siva Chandra 2021-06-28 22:24:00 -07:00
parent e1b8fde1cb
commit 487f74a6c4
1 changed files with 3 additions and 3 deletions

View File

@ -90,10 +90,10 @@ static inline int disableExcept(int excepts) {
}
static inline int clearExcept(int excepts) {
uint32_t controlWord = FEnv::getControlWord();
uint32_t statusWord = FEnv::getStatusWord();
uint32_t toClear = FEnv::getStatusValueForExcept(excepts);
controlWord &= ~(toClear << FEnv::ExceptionStatusFlagsBitPosition);
FEnv::writeStatusWord(controlWord);
statusWord &= ~(toClear << FEnv::ExceptionStatusFlagsBitPosition);
FEnv::writeStatusWord(statusWord);
return 0;
}