Fix shift corner-case, bug 774.
This commit is contained in:
parent
475e4207cc
commit
e77b7427b4
2
Changes
2
Changes
|
|
@ -21,7 +21,7 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||
|
||||
**** Fix pattern assignment to conditionals, bug769. [Jie Xu]
|
||||
|
||||
**** Fix shift corner-cases, bug765, bug766, bug768, bug772, bug776. [Clifford Wolf]
|
||||
**** Fix shift corner-cases, bug765, bug766, bug768, bug772, bug774, bug776. [Clifford Wolf]
|
||||
|
||||
**** Fix C compiler interpreting signing, bug773. [Clifford Wolf]
|
||||
|
||||
|
|
|
|||
|
|
@ -448,8 +448,8 @@ private:
|
|||
AstNode* newp = new AstShiftR (nodep->fileline(),
|
||||
fromp,
|
||||
dropCondBound(lsbp),
|
||||
nodep->width());
|
||||
newp->dtypeFrom(nodep);
|
||||
fromp->width()); // {large}>>32 requires 64-bit shift operation; then cast
|
||||
newp->dtypeFrom(fromp);
|
||||
if (!nodep->isQuad() && fromp->isQuad()) {
|
||||
newp = new AstCCast (newp->fileline(), newp, nodep);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -147,10 +147,16 @@
|
|||
`endif
|
||||
|
||||
// bug773
|
||||
w5_u = `c(31, "31");
|
||||
w5_u = `c(31, 31);
|
||||
w5_s = w5_u >> ((w5_u ? 1 : 2) << w5_u);
|
||||
`checkh(w5_s, 5'b0);
|
||||
|
||||
// bug774
|
||||
w4_u = `c(4, 5);
|
||||
w6_u = `c(6, 35);
|
||||
w4_u = 64'd0 | (w4_u << w6_u);
|
||||
`checkh(w4_u, 0);
|
||||
|
||||
// bug776
|
||||
w4_u = `c(4, 1);
|
||||
w4_u = (w4_u >> w4_u) ^~ (w4_u >> w4_u);
|
||||
|
|
|
|||
Loading…
Reference in New Issue