Fix extraction, part of fix missing VL_SHIFTL_QQW error, bug1412.

This commit is contained in:
Wilson Snyder 2019-03-28 19:40:40 -04:00
parent ca537dc3ed
commit efa6f4cd95

View File

@ -1919,13 +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 {
static inline QData VL_SHIFTL_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;
}
}
return VL_CLEAN_QQ(obits,obits,lhs<<rwp[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_SHIFTR: oclean=lclean; rclean==clean;