@@ -216,7 +216,7 @@ exprt float_bvt::is_zero(
216216{
217217 // we mask away the sign bit, which is the most significand bit
218218 const floatbv_typet &type=to_floatbv_type (src.type ());
219- unsigned width=type.get_width ();
219+ std:: size_t width=type.get_width ();
220220
221221 std::string mask_str;
222222 mask_str.resize (width, ' 1' );
@@ -333,7 +333,7 @@ Function: float_bvt::sign_bit
333333exprt float_bvt::sign_bit (const exprt &op)
334334{
335335 const bitvector_typet &bv_type=to_bitvector_type (op.type ());
336- unsigned width=bv_type.get_width ();
336+ std:: size_t width=bv_type.get_width ();
337337 return extractbit_exprt (op, width-1 );
338338}
339339
@@ -354,7 +354,7 @@ exprt float_bvt::from_signed_integer(
354354 const exprt &rm,
355355 const ieee_float_spect &spec)
356356{
357- unsigned src_width=to_signedbv_type (src.type ()).get_width ();
357+ std:: size_t src_width=to_signedbv_type (src.type ()).get_width ();
358358
359359 unbiased_floatt result;
360360
@@ -394,7 +394,7 @@ exprt float_bvt::from_unsigned_integer(
394394
395395 result.fraction =src;
396396
397- unsigned src_width=to_unsignedbv_type (src.type ()).get_width ();
397+ std:: size_t src_width=to_unsignedbv_type (src.type ()).get_width ();
398398
399399 // build an exponent (unbiased) -- this is signed!
400400 result.exponent =
@@ -421,7 +421,7 @@ Function: float_bvt::to_signed_integer
421421
422422exprt float_bvt::to_signed_integer (
423423 const exprt &src,
424- unsigned dest_width,
424+ std:: size_t dest_width,
425425 const exprt &rm,
426426 const ieee_float_spect &spec)
427427{
@@ -442,7 +442,7 @@ Function: float_bvt::to_unsigned_integer
442442
443443exprt float_bvt::to_unsigned_integer (
444444 const exprt &src,
445- unsigned dest_width,
445+ std:: size_t dest_width,
446446 const exprt &rm,
447447 const ieee_float_spect &spec)
448448{
@@ -463,7 +463,7 @@ Function: float_bvt::to_integer
463463
464464exprt float_bvt::to_integer (
465465 const exprt &src,
466- unsigned dest_width,
466+ std:: size_t dest_width,
467467 bool is_signed,
468468 const exprt &rm,
469469 const ieee_float_spect &spec)
@@ -553,7 +553,7 @@ exprt float_bvt::conversion(
553553 unbiased_floatt result;
554554
555555 // the fraction gets zero-padded
556- unsigned padding=dest_spec.f -src_spec.f ;
556+ std:: size_t padding=dest_spec.f -src_spec.f ;
557557 result.fraction =
558558 concatenation_exprt (
559559 unpacked_src.fraction ,
@@ -624,8 +624,8 @@ exprt float_bvt::subtract_exponents(
624624 const unbiased_floatt &src2)
625625{
626626 // extend both by one bit
627- unsigned old_width1=to_signedbv_type (src1.exponent .type ()).get_width ();
628- unsigned old_width2=to_signedbv_type (src2.exponent .type ()).get_width ();
627+ std:: size_t old_width1=to_signedbv_type (src1.exponent .type ()).get_width ();
628+ std:: size_t old_width2=to_signedbv_type (src2.exponent .type ()).get_width ();
629629 assert (old_width1==old_width2);
630630
631631 exprt extended_exponent1=typecast_exprt (src1.exponent , signedbv_typet (old_width1+1 ));
@@ -720,7 +720,7 @@ exprt float_bvt::add_sub(
720720 plus_exprt (fraction1_ext, fraction2_ext));
721721
722722 // sign of result
723- unsigned width = to_bitvector_type (result.fraction .type ()).get_width ();
723+ std:: size_t width = to_bitvector_type (result.fraction .type ()).get_width ();
724724 exprt fraction_sign=sign_exprt (typecast_exprt (result.fraction , signedbv_typet (width)));
725725 result.fraction =typecast_exprt (abs_exprt (typecast_exprt (result.fraction , signedbv_typet (width))),
726726 unsignedbv_typet (width));
@@ -802,8 +802,8 @@ exprt float_bvt::limit_distance(
802802 const exprt &dist,
803803 mp_integer limit)
804804{
805- unsigned nb_bits=integer2unsigned (address_bits (limit));
806- unsigned dist_width=to_unsignedbv_type (dist.type ()).get_width ();
805+ std:: size_t nb_bits=integer2unsigned (address_bits (limit));
806+ std:: size_t dist_width=to_unsignedbv_type (dist.type ()).get_width ();
807807
808808 if (dist_width<=nb_bits)
809809 return dist;
@@ -911,9 +911,9 @@ exprt float_bvt::div(
911911 const unbiased_floatt unpacked1=unpack (src1, spec);
912912 const unbiased_floatt unpacked2=unpack (src2, spec);
913913
914- unsigned fraction_width=
914+ std:: size_t fraction_width=
915915 to_unsignedbv_type (unpacked1.fraction .type ()).get_width ();
916- unsigned div_width=fraction_width*2 +1 ;
916+ std:: size_t div_width=fraction_width*2 +1 ;
917917
918918 // pad fraction1 with zeros
919919 exprt fraction1=
@@ -1212,8 +1212,8 @@ void float_bvt::normalization_shift(
12121212 // n-log-n alignment shifter.
12131213 // The worst-case shift is the number of fraction
12141214 // bits minus one, in case the faction is one exactly.
1215- unsigned fraction_bits=to_unsignedbv_type (fraction.type ()).get_width ();
1216- unsigned exponent_bits=to_signedbv_type (exponent.type ()).get_width ();
1215+ std:: size_t fraction_bits=to_unsignedbv_type (fraction.type ()).get_width ();
1216+ std:: size_t exponent_bits=to_signedbv_type (exponent.type ()).get_width ();
12171217 assert (fraction_bits!=0 );
12181218
12191219 unsigned depth=integer2unsigned (address_bits (fraction_bits-1 ));
@@ -1280,7 +1280,7 @@ void float_bvt::denormalization_shift(
12801280 // i.e. the exponent of the smallest normal number and thus the 'base'
12811281 // exponent for subnormal numbers.
12821282
1283- unsigned exponent_bits=to_signedbv_type (exponent.type ()).get_width ();
1283+ std:: size_t exponent_bits=to_signedbv_type (exponent.type ()).get_width ();
12841284 assert (exponent_bits>=spec.e );
12851285
12861286#if 1
@@ -1303,7 +1303,7 @@ void float_bvt::denormalization_shift(
13031303#if 1
13041304 // Care must be taken to not loose information required for the
13051305 // guard and sticky bits. +3 is for the hidden, guard and sticky bits.
1306- unsigned fraction_bits=to_unsignedbv_type (fraction.type ()).get_width ();
1306+ std:: size_t fraction_bits=to_unsignedbv_type (fraction.type ()).get_width ();
13071307
13081308 if (fraction_bits < spec.f +3 )
13091309 {
@@ -1413,18 +1413,18 @@ Function: float_bvt::fraction_rounding_decision
14131413\*******************************************************************/
14141414
14151415exprt float_bvt::fraction_rounding_decision (
1416- const unsigned dest_bits,
1416+ const std:: size_t dest_bits,
14171417 const exprt sign,
14181418 const exprt &fraction,
14191419 const rounding_mode_bitst &rounding_mode_bits)
14201420{
1421- unsigned fraction_bits=
1421+ std:: size_t fraction_bits=
14221422 to_unsignedbv_type (fraction.type ()).get_width ();
14231423
14241424 assert (dest_bits<fraction_bits);
14251425
14261426 // we have too many fraction bits
1427- unsigned extra_bits=fraction_bits-dest_bits;
1427+ std:: size_t extra_bits=fraction_bits-dest_bits;
14281428
14291429 // more than two extra bits are superflus, and are
14301430 // turned into a sticky bit
@@ -1492,15 +1492,15 @@ void float_bvt::round_fraction(
14921492 const rounding_mode_bitst &rounding_mode_bits,
14931493 const ieee_float_spect &spec)
14941494{
1495- unsigned fraction_size=spec.f +1 ;
1496- unsigned result_fraction_size=
1495+ std:: size_t fraction_size=spec.f +1 ;
1496+ std:: size_t result_fraction_size=
14971497 to_unsignedbv_type (result.fraction .type ()).get_width ();
14981498
14991499 // do we need to enlarge the fraction?
15001500 if (result_fraction_size<fraction_size)
15011501 {
15021502 // pad with zeros at bottom
1503- unsigned padding=fraction_size-result_fraction_size;
1503+ std:: size_t padding=fraction_size-result_fraction_size;
15041504
15051505 result.fraction =concatenation_exprt (
15061506 result.fraction ,
@@ -1513,7 +1513,7 @@ void float_bvt::round_fraction(
15131513 }
15141514 else // fraction gets smaller -- rounding
15151515 {
1516- unsigned extra_bits=result_fraction_size-fraction_size;
1516+ std:: size_t extra_bits=result_fraction_size-fraction_size;
15171517 assert (extra_bits>=1 );
15181518
15191519 // this computes the rounding decision
@@ -1612,7 +1612,7 @@ void float_bvt::round_exponent(
16121612 const rounding_mode_bitst &rounding_mode_bits,
16131613 const ieee_float_spect &spec)
16141614{
1615- unsigned result_exponent_size=
1615+ std:: size_t result_exponent_size=
16161616 to_signedbv_type (result.exponent .type ()).get_width ();
16171617
16181618 // do we need to enlarge the exponent?
@@ -1877,13 +1877,13 @@ exprt float_bvt::sticky_right_shift(
18771877 const exprt &dist,
18781878 exprt &sticky)
18791879{
1880- unsigned d=1 , width=to_unsignedbv_type (op.type ()).get_width ();
1880+ std:: size_t d=1 , width=to_unsignedbv_type (op.type ()).get_width ();
18811881 exprt result=op;
18821882 sticky=false_exprt ();
18831883
1884- unsigned dist_width=to_bitvector_type (dist.type ()).get_width ();
1884+ std:: size_t dist_width=to_bitvector_type (dist.type ()).get_width ();
18851885
1886- for (unsigned stage=0 ; stage<dist_width; stage++)
1886+ for (std:: size_t stage=0 ; stage<dist_width; stage++)
18871887 {
18881888 exprt tmp=lshr_exprt (result, d);
18891889
0 commit comments