From bd71b7fbb221a362104b46dee7f8c5b7047dca87 Mon Sep 17 00:00:00 2001 From: Stephen Williams Date: Sat, 11 Oct 2008 09:19:11 -0700 Subject: [PATCH] Real valued multiply are always signed. By definition. --- net_expr.cc | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/net_expr.cc b/net_expr.cc index 09d2ce116..1644b87a4 100644 --- a/net_expr.cc +++ b/net_expr.cc @@ -262,14 +262,10 @@ NetEBMult::NetEBMult(char op, NetExpr*l, NetExpr*r) else expr_width(l->expr_width() + r->expr_width()); - cast_signed(l->has_sign() && r->has_sign()); - - /* If it turns out that this is not a signed expression, then - cast the signedness out of the operands as well. */ - if (! has_sign()) { - l->cast_signed(false); - r->cast_signed(false); - } + if (expr_type() == IVL_VT_REAL) + cast_signed(true); + else + cast_signed(l->has_sign() && r->has_sign()); } NetEBMult::~NetEBMult()