[libc-commits] [libc] 487f74a - [libc][Obvious] Fix typo in implementation of aarch64 clearExcept.
Siva Chandra via libc-commits
libc-commits at lists.llvm.org
Mon Jun 28 23:18:40 PDT 2021
Author: Siva Chandra
Date: 2021-06-28T23:17:37-07:00
New Revision: 487f74a6c4151d13d3a7b54ee4ab7beaf3e87487
URL: https://github.com/llvm/llvm-project/commit/487f74a6c4151d13d3a7b54ee4ab7beaf3e87487
DIFF: https://github.com/llvm/llvm-project/commit/487f74a6c4151d13d3a7b54ee4ab7beaf3e87487.diff
LOG: [libc][Obvious] Fix typo in implementation of aarch64 clearExcept.
Instead of reading and updating the status word, control word was being
updated.
Added:
Modified:
libc/utils/FPUtil/aarch64/FEnv.h
Removed:
################################################################################
diff --git a/libc/utils/FPUtil/aarch64/FEnv.h b/libc/utils/FPUtil/aarch64/FEnv.h
index 327ce0726568..93af9a219d03 100644
--- a/libc/utils/FPUtil/aarch64/FEnv.h
+++ b/libc/utils/FPUtil/aarch64/FEnv.h
@@ -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;
}
More information about the libc-commits
mailing list