Do not try to set constants to width 0.
This commit is contained in:
parent
0d779098f0
commit
7e2848b105
11
net_expr.cc
11
net_expr.cc
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#ifdef HAVE_CVS_IDENT
|
||||
#ident "$Id: net_expr.cc,v 1.16 2003/03/15 18:08:43 steve Exp $"
|
||||
#ident "$Id: net_expr.cc,v 1.17 2003/05/20 15:05:33 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "config.h"
|
||||
|
|
@ -123,6 +123,9 @@ NetEBComp::NetEBComp(char op, NetExpr*l, NetExpr*r)
|
|||
if (tmp->has_width())
|
||||
break;
|
||||
|
||||
if (l->expr_width() == 0)
|
||||
break;
|
||||
|
||||
if (tmp->expr_width() == l->expr_width())
|
||||
break;
|
||||
|
||||
|
|
@ -135,6 +138,9 @@ NetEBComp::NetEBComp(char op, NetExpr*l, NetExpr*r)
|
|||
if (tmp->has_width())
|
||||
break;
|
||||
|
||||
if (r->expr_width() == 0)
|
||||
break;
|
||||
|
||||
if (tmp->expr_width() == r->expr_width())
|
||||
break;
|
||||
|
||||
|
|
@ -456,6 +462,9 @@ NetExpr::TYPE NetESFunc::expr_type() const
|
|||
|
||||
/*
|
||||
* $Log: net_expr.cc,v $
|
||||
* Revision 1.17 2003/05/20 15:05:33 steve
|
||||
* Do not try to set constants to width 0.
|
||||
*
|
||||
* Revision 1.16 2003/03/15 18:08:43 steve
|
||||
* Comparison operators do have defined width.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#ifdef HAVE_CVS_IDENT
|
||||
#ident "$Id: set_width.cc,v 1.29 2003/05/04 20:04:09 steve Exp $"
|
||||
#ident "$Id: set_width.cc,v 1.30 2003/05/20 15:05:33 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "config.h"
|
||||
|
|
@ -247,6 +247,8 @@ bool NetEConst::set_width(unsigned w)
|
|||
return true;
|
||||
}
|
||||
|
||||
assert(w != 0);
|
||||
|
||||
if (w > value_.len()) {
|
||||
verinum::V pad = verinum::V0;
|
||||
if (value_.has_sign()) {
|
||||
|
|
@ -408,6 +410,9 @@ bool NetEUReduce::set_width(unsigned w)
|
|||
|
||||
/*
|
||||
* $Log: set_width.cc,v $
|
||||
* Revision 1.30 2003/05/20 15:05:33 steve
|
||||
* Do not try to set constants to width 0.
|
||||
*
|
||||
* Revision 1.29 2003/05/04 20:04:09 steve
|
||||
* Fix truncation of signed constant in constant addition.
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in New Issue