mirror of https://github.com/YosysHQ/yosys.git
Fixed sign propagation in bit-wise operators
This commit is contained in:
parent
5dab327b30
commit
ed62fcdbe2
|
@ -896,6 +896,7 @@ RTLIL::SigSpec AstNode::genRTLIL(int width_hint, bool sign_hint)
|
||||||
int width = std::max(left.width, right.width);
|
int width = std::max(left.width, right.width);
|
||||||
if (width_hint > 0)
|
if (width_hint > 0)
|
||||||
width = width_hint;
|
width = width_hint;
|
||||||
|
is_signed = children[0]->is_signed && children[1]->is_signed;
|
||||||
return binop2rtlil(this, type_name, width, left, right);
|
return binop2rtlil(this, type_name, width, left, right);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue