Real valued multiply are always signed.

By definition.
This commit is contained in:
Stephen Williams 2008-10-11 09:19:11 -07:00
parent 3a99a5e800
commit bd71b7fbb2
1 changed files with 4 additions and 8 deletions

View File

@ -262,14 +262,10 @@ NetEBMult::NetEBMult(char op, NetExpr*l, NetExpr*r)
else else
expr_width(l->expr_width() + r->expr_width()); expr_width(l->expr_width() + r->expr_width());
cast_signed(l->has_sign() && r->has_sign()); if (expr_type() == IVL_VT_REAL)
cast_signed(true);
/* If it turns out that this is not a signed expression, then else
cast the signedness out of the operands as well. */ cast_signed(l->has_sign() && r->has_sign());
if (! has_sign()) {
l->cast_signed(false);
r->cast_signed(false);
}
} }
NetEBMult::~NetEBMult() NetEBMult::~NetEBMult()