Use correct sign for signal and constant addition.
This was incorrectly using the expression sign not checking if the two sub-expressions are both signed. This likely used to work, but in the context of $signed which sets the expression to signed so we can have a signed expression without both sub-expressions being signed.
This commit is contained in:
parent
354d600453
commit
236f56949f
|
|
@ -1396,9 +1396,9 @@ static struct vector_info draw_binary_expr_arith(ivl_expr_t exp, unsigned wid)
|
|||
struct vector_info lv;
|
||||
struct vector_info rv;
|
||||
|
||||
const char*sign_string = ivl_expr_signed(le) && ivl_expr_signed(re)? "/s" : "";
|
||||
int signed_flag = ivl_expr_signed(le) && ivl_expr_signed(re) ? 1 : 0;
|
||||
const char*sign_string = signed_flag ? "/s" : "";
|
||||
|
||||
int signed_flag = ivl_expr_signed(exp)? 1 : 0;
|
||||
|
||||
if ((ivl_expr_opcode(exp) == '+')
|
||||
&& (ivl_expr_type(le) == IVL_EX_SIGNAL)
|
||||
|
|
|
|||
Loading…
Reference in New Issue