mirror of
https://github.com/verilator/verilator.git
synced 2026-09-07 01:52:17 +02:00
Internals: Merge AstCCast minwidth set. No functional change intended
This commit is contained in:
+3
-2
@@ -2882,10 +2882,11 @@ struct AstCCast : public AstNodeUniop {
|
||||
private:
|
||||
int m_size;
|
||||
public:
|
||||
AstCCast(FileLine* fl, AstNode* lhsp, int setwidth) : AstNodeUniop(fl, lhsp) {
|
||||
AstCCast(FileLine* fl, AstNode* lhsp, int setwidth, int minwidth=-1) : AstNodeUniop(fl, lhsp) {
|
||||
m_size=setwidth;
|
||||
if (setwidth) {
|
||||
dtypeSetLogicSized(setwidth,setwidth,AstNumeric::UNSIGNED);
|
||||
if (minwidth==-1) minwidth=setwidth;
|
||||
dtypeSetLogicSized(setwidth,minwidth,AstNumeric::UNSIGNED);
|
||||
}
|
||||
}
|
||||
AstCCast(FileLine* fl, AstNode* lhsp, AstNode* typeFromp) : AstNodeUniop(fl, lhsp) {
|
||||
|
||||
+1
-2
@@ -77,8 +77,7 @@ private:
|
||||
AstNRelinker relinkHandle;
|
||||
nodep->unlinkFrBack(&relinkHandle);
|
||||
//
|
||||
AstCCast* castp = new AstCCast (nodep->fileline(), nodep, needsize);
|
||||
castp->width(needsize, nodep->widthMin());
|
||||
AstCCast* castp = new AstCCast (nodep->fileline(), nodep, needsize, nodep->widthMin());
|
||||
relinkHandle.relink(castp);
|
||||
//if (debug()>8) castp->dumpTree(cout,"-castins: ");
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user