Implement APFloat::isDenormal()

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171764 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Shuxin Yang
2013-01-07 18:59:35 +00:00
parent 637582eaf7
commit 7aa1c321f0
3 changed files with 60 additions and 0 deletions

View File

@ -696,6 +696,13 @@ APFloat::operator=(const APFloat &rhs)
return *this;
}
bool
APFloat::isDenormal() const {
return isNormal() && (exponent == semantics->minExponent) &&
(APInt::tcExtractBit(significandParts(),
semantics->precision - 1) == 0);
}
bool
APFloat::bitwiseIsEqual(const APFloat &rhs) const {
if (this == &rhs)