Skip to content
This repository
Browse code

Help system function signedness survive elaboration.

  • Loading branch information...
commit b3529d85933bc211d70f63204d6be430205f0ae4 1 parent 112368c
steve authored
7 dup_expr.cc
@@ -17,7 +17,7 @@
17 17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
18 18 */
19 19 #ifdef HAVE_CVS_IDENT
20   -#ident "$Id: dup_expr.cc,v 1.17 2004/05/31 23:34:36 steve Exp $"
  20 +#ident "$Id: dup_expr.cc,v 1.18 2004/06/17 16:06:18 steve Exp $"
21 21 #endif
22 22
23 23 # include "config.h"
@@ -75,6 +75,8 @@ NetESFunc* NetESFunc::dup_expr() const
75 75 {
76 76 NetESFunc*tmp = new NetESFunc(name_, type_, expr_width(), nparms());
77 77 assert(tmp);
  78 +
  79 + tmp->cast_signed(has_sign());
78 80 for (unsigned idx = 0 ; idx < nparms() ; idx += 1) {
79 81 assert(tmp->parm(idx));
80 82 tmp->parm(idx, tmp->parm(idx)->dup_expr());
@@ -141,6 +143,9 @@ NetEVariable* NetEVariable::dup_expr() const
141 143
142 144 /*
143 145 * $Log: dup_expr.cc,v $
  146 + * Revision 1.18 2004/06/17 16:06:18 steve
  147 + * Help system function signedness survive elaboration.
  148 + *
144 149 * Revision 1.17 2004/05/31 23:34:36 steve
145 150 * Rewire/generalize parsing an elaboration of
146 151 * function return values to allow for better
7 elab_expr.cc
@@ -17,7 +17,7 @@
17 17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
18 18 */
19 19 #ifdef HAVE_CVS_IDENT
20   -#ident "$Id: elab_expr.cc,v 1.87 2004/06/04 23:34:15 steve Exp $"
  20 +#ident "$Id: elab_expr.cc,v 1.88 2004/06/17 16:06:18 steve Exp $"
21 21 #endif
22 22
23 23 # include "config.h"
@@ -244,6 +244,8 @@ NetExpr* PECallFunction::elaborate_sfunc_(Design*des, NetScope*scope) const
244 244
245 245 NetESFunc*fun = new NetESFunc(path_.peek_name(0), sfunc_type,
246 246 wid, nparms);
  247 + if (sfunc_info->signed_flag)
  248 + fun->cast_signed(true);
247 249
248 250 /* Now run through the expected parameters. If we find that
249 251 there are missing parameters, print an error message.
@@ -965,6 +967,9 @@ NetExpr* PEUnary::elaborate_expr(Design*des, NetScope*scope, bool) const
965 967
966 968 /*
967 969 * $Log: elab_expr.cc,v $
  970 + * Revision 1.88 2004/06/17 16:06:18 steve
  971 + * Help system function signedness survive elaboration.
  972 + *
968 973 * Revision 1.87 2004/06/04 23:34:15 steve
969 974 * Special case for unary - of real literal.
970 975 *
6 t-dll-expr.cc
@@ -17,7 +17,7 @@
17 17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
18 18 */
19 19 #ifdef HAVE_CVS_IDENT
20   -#ident "$Id: t-dll-expr.cc,v 1.38 2003/07/26 03:34:43 steve Exp $"
  20 +#ident "$Id: t-dll-expr.cc,v 1.39 2004/06/17 16:06:19 steve Exp $"
21 21 #endif
22 22
23 23 # include "config.h"
@@ -382,6 +382,7 @@ void dll_target::expr_sfunc(const NetESFunc*net)
382 382 break;
383 383 }
384 384 expr->width_= net->expr_width();
  385 + expr->signed_ = net->has_sign()? 1 : 0;
385 386 /* system function names are lex_strings strings. */
386 387 expr->u_.sfunc_.name_ = net->name();
387 388
@@ -603,6 +604,9 @@ void dll_target::expr_variable(const NetEVariable*net)
603 604
604 605 /*
605 606 * $Log: t-dll-expr.cc,v $
  607 + * Revision 1.39 2004/06/17 16:06:19 steve
  608 + * Help system function signedness survive elaboration.
  609 + *
606 610 * Revision 1.38 2003/07/26 03:34:43 steve
607 611 * Start handling pad of expressions in code generators.
608 612 *
9 tgt-stub/stub.c
@@ -17,7 +17,7 @@
17 17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
18 18 */
19 19 #ifdef HAVE_CVS_IDENT
20   -#ident "$Id: stub.c,v 1.85 2004/06/16 16:22:04 steve Exp $"
  20 +#ident "$Id: stub.c,v 1.86 2004/06/17 16:06:19 steve Exp $"
21 21 #endif
22 22
23 23 # include "config.h"
@@ -121,8 +121,8 @@ static void show_expression(ivl_expr_t net, unsigned ind)
121 121 break;
122 122
123 123 case IVL_EX_SFUNC:
124   - fprintf(out, "%*s<function=\"%s\", width=%u>\n", ind, "",
125   - ivl_expr_name(net), ivl_expr_width(net));
  124 + fprintf(out, "%*s<function=\"%s\", width=%u, %s>\n", ind, "",
  125 + ivl_expr_name(net), ivl_expr_width(net), sign);
126 126 { unsigned cnt = ivl_expr_parms(net);
127 127 unsigned idx;
128 128 for (idx = 0 ; idx < cnt ; idx += 1)
@@ -909,6 +909,9 @@ int target_design(ivl_design_t des)
909 909
910 910 /*
911 911 * $Log: stub.c,v $
  912 + * Revision 1.86 2004/06/17 16:06:19 steve
  913 + * Help system function signedness survive elaboration.
  914 + *
912 915 * Revision 1.85 2004/06/16 16:22:04 steve
913 916 * Dump NE LPM device.
914 917 *

0 comments on commit b3529d8

Please sign in to comment.
Something went wrong with that request. Please try again.