From 4bb1bd43157c36336c304efcd1bbd5d3eb06fc07 Mon Sep 17 00:00:00 2001 From: steve Date: Tue, 16 Oct 2001 03:10:20 +0000 Subject: [PATCH] Get Division error into the division method! --- vvp/arith.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/vvp/arith.cc b/vvp/arith.cc index 7d6700e39..6831af136 100644 --- a/vvp/arith.cc +++ b/vvp/arith.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) -#ident "$Id: arith.cc,v 1.15 2001/10/16 03:06:18 steve Exp $" +#ident "$Id: arith.cc,v 1.16 2001/10/16 03:10:20 steve Exp $" #endif # include "arith.h" @@ -66,6 +66,8 @@ void vvp_arith_div::set(vvp_ipoint_t i, functor_t f, bool push) unsigned ival = obj->ival; if (ival & 0xaa) { + fprintf(stderr, "Division by 0 error: " + "returning X value\n"); output_x_(push); return; } @@ -123,7 +125,6 @@ if(wid_ <= 8*sizeof(unsigned long)) { unsigned ival = obj->ival; if (ival & 0xaa) { - fprintf(stderr, "Division by 0 error: returning X value\n"); output_x_(push); return; } @@ -633,6 +634,9 @@ void vvp_shiftr::set(vvp_ipoint_t i, functor_t f, bool push) /* * $Log: arith.cc,v $ + * Revision 1.16 2001/10/16 03:10:20 steve + * Get Division error into the division method! + * * Revision 1.15 2001/10/16 03:06:18 steve * Catch division by zero in .arith/div. *