Fix missing VL_SHIFTL_ errors, bug1412, bug1415.

Signed-off-by: Wilson Snyder <wsnyder@wsnyder.org>
This commit is contained in:
Larry Lee 2019-04-05 19:32:25 -04:00 committed by Wilson Snyder
parent d8a020905a
commit 6a331e37fc
2 changed files with 11 additions and 2 deletions

View File

@ -6,7 +6,7 @@ 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]
**** Fix missing VL_SHIFTL_ errors, bug1412, bug1415. [Larry Lee]
**** Fix MinGW GCC 6 printf formats, bug1413. [Sergey Kvachonok]

View File

@ -1967,7 +1967,7 @@ static inline WDataOutP VL_SHIFTR_WWW(int obits, int lbits, int rbits,
}
return VL_SHIFTR_WWI(obits,lbits,32,owp,lwp,rwp[0]);
}
static inline IData VL_SHIFTR_IIW(int obits,int,int rbits,IData lhs, WDataInP rwp) VL_MT_SAFE {
static inline IData VL_SHIFTR_IIW(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;
@ -1975,6 +1975,15 @@ static inline IData VL_SHIFTR_IIW(int obits,int,int rbits,IData lhs, WDataInP rw
}
return VL_CLEAN_II(obits,obits,lhs>>rwp[0]);
}
static inline QData VL_SHIFTR_QQW(int obits, int, int rbits, QData 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;
}
}
// Above checks rwp[1]==0 so not needed in below shift
return VL_CLEAN_QQ(obits, obits, lhs>>(static_cast<QData>(rwp[0])));
}
// EMIT_RULE: VL_SHIFTRS: oclean=false; lclean=clean, rclean==clean;
static inline IData VL_SHIFTRS_III(int obits, int lbits, int, IData lhs, IData rhs) VL_PURE {