Make sure argument to unary - is signed
This commit is contained in:
parent
09f3eb4a36
commit
3f73c9bb54
|
|
@ -158,6 +158,7 @@ static vhdl_expr *translate_unary(ivl_expr_t e)
|
||||||
return new vhdl_unaryop_expr
|
return new vhdl_unaryop_expr
|
||||||
(VHDL_UNARYOP_NOT, operand, new vhdl_type(*operand->get_type()));
|
(VHDL_UNARYOP_NOT, operand, new vhdl_type(*operand->get_type()));
|
||||||
case '-':
|
case '-':
|
||||||
|
operand = change_signedness(operand, true);
|
||||||
return new vhdl_unaryop_expr
|
return new vhdl_unaryop_expr
|
||||||
(VHDL_UNARYOP_NEG, operand, new vhdl_type(*operand->get_type()));
|
(VHDL_UNARYOP_NEG, operand, new vhdl_type(*operand->get_type()));
|
||||||
case 'N': // NOR
|
case 'N': // NOR
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue