Ternary expressions can be signed.
This commit is contained in:
parent
eb27dc8db3
commit
e630ecdb0d
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#if !defined(WINNT) && !defined(macintosh)
|
||||
#ident "$Id: netlist.cc,v 1.182 2002/04/14 18:41:34 steve Exp $"
|
||||
#ident "$Id: netlist.cc,v 1.183 2002/04/14 19:02:34 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "config.h"
|
||||
|
|
@ -2311,6 +2311,7 @@ NetETernary::NetETernary(NetExpr*c, NetExpr*t, NetExpr*f)
|
|||
: cond_(c), true_val_(t), false_val_(f)
|
||||
{
|
||||
expr_width(true_val_->expr_width());
|
||||
cast_signed(c->has_sign() && t->has_sign() && f->has_sign());
|
||||
}
|
||||
|
||||
NetETernary::~NetETernary()
|
||||
|
|
@ -2427,6 +2428,9 @@ const NetProc*NetTaskDef::proc() const
|
|||
|
||||
/*
|
||||
* $Log: netlist.cc,v $
|
||||
* Revision 1.183 2002/04/14 19:02:34 steve
|
||||
* Ternary expressions can be signed.
|
||||
*
|
||||
* Revision 1.182 2002/04/14 18:41:34 steve
|
||||
* Support signed integer division.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#if !defined(WINNT) && !defined(macintosh)
|
||||
#ident "$Id: stub.c,v 1.52 2002/04/14 02:44:53 steve Exp $"
|
||||
#ident "$Id: stub.c,v 1.53 2002/04/14 19:02:34 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "config.h"
|
||||
|
|
@ -84,6 +84,14 @@ static void show_expression(ivl_expr_t net, unsigned ind)
|
|||
ivl_expr_name(net), width, sign);
|
||||
break;
|
||||
|
||||
case IVL_EX_TERNARY:
|
||||
fprintf(out, "%*s<ternary width=%u, %s>\n", ind, "",
|
||||
width, sign);
|
||||
show_expression(ivl_expr_oper1(net), ind+4);
|
||||
show_expression(ivl_expr_oper2(net), ind+4);
|
||||
show_expression(ivl_expr_oper3(net), ind+4);
|
||||
break;
|
||||
|
||||
case IVL_EX_UNARY:
|
||||
fprintf(out, "%*s<unary \"%c\" width=%u, %s>\n", ind, "",
|
||||
ivl_expr_opcode(net), width, sign);
|
||||
|
|
@ -607,6 +615,9 @@ int target_design(ivl_design_t des)
|
|||
|
||||
/*
|
||||
* $Log: stub.c,v $
|
||||
* Revision 1.53 2002/04/14 19:02:34 steve
|
||||
* Ternary expressions can be signed.
|
||||
*
|
||||
* Revision 1.52 2002/04/14 02:44:53 steve
|
||||
* Show unary subexpressions.
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in New Issue