Always type '$clog2' as signed 32
This commit is contained in:
parent
60eab3eb8c
commit
89924bda51
|
|
@ -6139,7 +6139,9 @@ public:
|
|||
class AstCLog2 final : public AstNodeUniop {
|
||||
public:
|
||||
AstCLog2(FileLine* fl, AstNode* lhsp)
|
||||
: ASTGEN_SUPER_CLog2(fl, lhsp) {}
|
||||
: ASTGEN_SUPER_CLog2(fl, lhsp) {
|
||||
dtypeSetSigned32();
|
||||
}
|
||||
ASTNODE_NODE_FUNCS(CLog2)
|
||||
virtual void numberOperate(V3Number& out, const V3Number& lhs) override { out.opCLog2(lhs); }
|
||||
virtual string emitVerilog() override { return "%f$clog2(%l)"; }
|
||||
|
|
|
|||
|
|
@ -1248,10 +1248,7 @@ private:
|
|||
}
|
||||
}
|
||||
virtual void visit(AstCLog2* nodep) override {
|
||||
if (m_vup->prelim()) {
|
||||
iterateCheckSizedSelf(nodep, "LHS", nodep->lhsp(), SELF, BOTH);
|
||||
nodep->dtypeSetSigned32();
|
||||
}
|
||||
if (m_vup->prelim()) { iterateCheckSizedSelf(nodep, "LHS", nodep->lhsp(), SELF, BOTH); }
|
||||
}
|
||||
virtual void visit(AstPow* nodep) override {
|
||||
// Pow is special, output sign only depends on LHS sign, but
|
||||
|
|
|
|||
Loading…
Reference in New Issue