diff --git a/tgt-vvp/eval_expr.c b/tgt-vvp/eval_expr.c index 4a2df610f..ff44ba33e 100644 --- a/tgt-vvp/eval_expr.c +++ b/tgt-vvp/eval_expr.c @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) -#ident "$Id: eval_expr.c,v 1.49 2001/10/14 03:24:35 steve Exp $" +#ident "$Id: eval_expr.c,v 1.50 2001/10/16 01:27:17 steve Exp $" #endif # include "vvp_priv.h" @@ -524,6 +524,10 @@ static struct vector_info draw_binary_expr_arith(ivl_expr_t exp, unsigned wid) fprintf(vvp_out, " %%mul %u, %u, %u;\n", lv.base, rv.base, wid); break; + case '/': + fprintf(vvp_out, " %%div %u, %u, %u;\n", lv.base, rv.base, wid); + break; + case '%': fprintf(vvp_out, " %%mod %u, %u, %u;\n", lv.base, rv.base, wid); break; @@ -564,6 +568,7 @@ static struct vector_info draw_binary_expr(ivl_expr_t exp, unsigned wid) case '+': case '-': case '*': + case '/': case '%': rv = draw_binary_expr_arith(exp, wid); break; @@ -1284,6 +1289,9 @@ struct vector_info draw_eval_expr(ivl_expr_t exp) /* * $Log: eval_expr.c,v $ + * Revision 1.50 2001/10/16 01:27:17 steve + * Generate %div instructions for binary /. + * * Revision 1.49 2001/10/14 03:24:35 steve * Handle constant bits in arithmetic expressions. *