Support $countbits (#2287)

This commit is contained in:
Yossi Nivin
2020-05-10 14:27:22 -04:00
committed by GitHub
parent 070bcddf5a
commit f9a0cf0cff
22 changed files with 441 additions and 9 deletions
+9
View File
@@ -128,6 +128,15 @@ private:
if (nodep->sizeMattersRhs()) ensureCast(nodep->rhsp());
if (nodep->sizeMattersThs()) ensureCast(nodep->thsp());
}
virtual void visit(AstNodeQuadop* nodep) VL_OVERRIDE {
iterateChildren(nodep);
nodep->user1(nodep->lhsp()->user1() | nodep->rhsp()->user1() | nodep->thsp()->user1()
| nodep->fhsp()->user1());
if (nodep->sizeMattersLhs()) ensureCast(nodep->lhsp());
if (nodep->sizeMattersRhs()) ensureCast(nodep->rhsp());
if (nodep->sizeMattersThs()) ensureCast(nodep->thsp());
if (nodep->sizeMattersFhs()) ensureCast(nodep->fhsp());
}
virtual void visit(AstCCast* nodep) VL_OVERRIDE {
iterateChildren(nodep);
ensureLower32Cast(nodep);