Internals: Create user#Inc routines

This commit is contained in:
Wilson Snyder
2010-04-15 20:56:54 -04:00
parent 10689ffaba
commit 930cbeec17
13 changed files with 27 additions and 36 deletions
+1 -2
View File
@@ -196,9 +196,8 @@ private:
}
void visitShift (AstNodeBiop* nodep) {
// Shifts of > 32/64 bits in C++ will wrap-around and generate non-0s
if (!nodep->user2()) {
if (!nodep->user2Inc()) {
UINFO(4," ShiftFix "<<nodep<<endl);
nodep->user2(true);
if (nodep->widthMin()<=64 // Else we'll use large operators which work right
// C operator's width must be < maximum shift which is based on Verilog width
&& nodep->width() < (1LL<<nodep->rhsp()->widthMin())) {