Internal code coverage improvements. No functional change intended.

This commit is contained in:
Wilson Snyder
2020-05-23 10:34:58 -04:00
parent c18b0eb122
commit 6a882f9dc6
20 changed files with 83 additions and 51 deletions
+4 -13
View File
@@ -467,8 +467,8 @@ string V3Number::ascii(bool prefixed, bool cleanVerilog) const {
if (isDouble()) {
out.precision(17);
if (width() != 64) {
out << "%E-bad-width-double";
if (VL_UNCOVERABLE(width() != 64)) {
out << "%E-bad-width-double"; // LCOV_EXCL_LINE
} else {
out << toDouble();
}
@@ -476,8 +476,8 @@ string V3Number::ascii(bool prefixed, bool cleanVerilog) const {
} else if (isString()) {
return '"' + toString() + '"';
} else {
if ((m_value[words() - 1] | m_valueX[words() - 1]) & ~hiWordMask()) {
out << "%E-hidden-bits";
if (VL_UNCOVERABLE((m_value[words() - 1] | m_valueX[words() - 1]) & ~hiWordMask())) {
out << "%E-hidden-bits"; // LCOV_EXCL_LINE
}
}
if (prefixed) {
@@ -936,15 +936,6 @@ bool V3Number::isAnyXZ() const {
}
return false;
}
bool V3Number::isLt(const V3Number& rhs) const {
for (int bit = 0; bit < std::max(this->width(), rhs.width()); bit++) {
if (this->bitIs1(bit) && rhs.bitIs0(bit)) { return 1; }
if (rhs.bitIs1(bit) && this->bitIs0(bit)) { return 0; }
if (this->bitIsXZ(bit)) { return 0; }
if (rhs.bitIsXZ(bit)) { return 0; }
}
return 0;
}
bool V3Number::isLtXZ(const V3Number& rhs) const {
// Include X/Z in comparisons for sort ordering
for (int bit = 0; bit < std::max(this->width(), rhs.width()); bit++) {