forked from OSchip/llvm-project
[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:
parent
e1b8fde1cb
commit
487f74a6c4
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue