Generate %div instructions for binary /.
This commit is contained in:
parent
a3217db7b2
commit
821c68696d
|
|
@ -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.
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in New Issue