> On Aug. 21, 2012, 2:06 p.m., Andreas Hansson wrote: > > src/sim/simulate.cc, line 54 > > <http://reviews.gem5.org/r/1361/diff/1/?file=28936#file28936line54> > > > > Well spotted! > > > > How about making the check (MaxTick - curTick()) > num_cycles and thus > > not "rely" on the behaviour of the overflow? > > Anthony Gutierrez wrote: > Isn't that precisely the case when we don't have an overflow? Shouldn't > it be: > > if (MaxTick - curTick() < num_cycles) > > or even: > > if (MaxTick - curTick() <= num_cycles) //explicitly set to MaxTick when > num_cycles + curTick() would be equal to MaxTick > > ?
Absolutely right. Perhaps even put num_cycles on the left hand side. - Andreas ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://reviews.gem5.org/r/1361/#review3278 ----------------------------------------------------------- On Aug. 21, 2012, 2:16 p.m., Anthony Gutierrez wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > http://reviews.gem5.org/r/1361/ > ----------------------------------------------------------- > > (Updated Aug. 21, 2012, 2:16 p.m.) > > > Review request for Default. > > > Description > ------- > > Changeset 9163:b58917fb1892 > --------------------------- > sim: fix overflow check in simulate because Tick is now unsigned > > > Diffs > ----- > > src/sim/simulate.cc 019047ead23b43b584d01d50750b0ac99923cc1c > > Diff: http://reviews.gem5.org/r/1361/diff/ > > > Testing > ------- > > > Thanks, > > Anthony Gutierrez > > _______________________________________________ gem5-dev mailing list [email protected] http://m5sim.org/mailman/listinfo/gem5-dev
