Fix missing VL_SHIFTL_QQW error, bug1412.

Signed-off-by: Wilson Snyder <wsnyder@wsnyder.org>
This commit is contained in:
Larry Lee 2019-03-28 19:11:46 -04:00 committed by Wilson Snyder
parent 3b64f54cea
commit ca537dc3ed
2 changed files with 10 additions and 0 deletions

View File

@ -6,6 +6,8 @@ The contributors that suggested a given feature are shown in []. Thanks!
**** Support '#' comments in $readmem, bug1411. [Frederick Requin]
**** Fix missing VL_SHIFTL_QQW error, bug1412. [Larry Lee]
* Verilator 4.012 2019-3-23

View File

@ -1919,6 +1919,14 @@ static inline IData VL_SHIFTL_IIW(int obits,int,int rbits,IData lhs, WDataInP rw
}
return VL_CLEAN_II(obits,obits,lhs<<rwp[0]);
}
static inline QData VL_SHIFTL_QQW(int obits,int,int rbits,IData lhs, WDataInP rwp) VL_MT_SAFE {
for (int i=1; i < VL_WORDS_I(rbits); ++i) {
if (VL_UNLIKELY(rwp[i])) { // Huge shift 1>>32 or more
return 0;
}
}
return VL_CLEAN_QQ(obits,obits,lhs<<rwp[0]);
}
// EMIT_RULE: VL_SHIFTR: oclean=lclean; rclean==clean;
// Important: Unlike most other funcs, the shift might well be a computed