[PTLsim-devel] regarding maskop in rvn 225

abhishek
Tue Jan 22 20:08:13 EST 2008


The revision is 225 and not 118, sorry about that.

try this.

bitvec<48> valid;
valid.setall();
cerr << valid, endl, flush;
valid.remove(32, 1);
cerr << valid, endl, flush;

I've a 32-bit machine. It seems maskop operator is not correct. I have
made the following changed as composed in the mail below. Do let me know
if that's ok.

regards,
abhishek

On Mon, 2008-01-21 at 23:33 +0100, abhishek wrote:
> Hi,
> 
> In the function maskop in superstl.h the mask m gets a wrong value if
> count%BITS_PER_WORD == 0.
> 
> Original statement
>  T m =
>         (!count) ? 0 :
>         (count % BITS_PER_WORD) ? ((T(1) << bitof(count)) - T(1)) :
>         T(-1);
> 
> After the change
>  T m =
>         (!count) ? 0 :
>         (count % BITS_PER_WORD) ? ((T(1) << bitof(count)) - T(1)) :
>         0;//T(-1);
> 
> Do let me know if this sounds ok.
> 
> regards,
> abhishek
> 
> 
> _______________________________________________
> PTLsim-devel mailing list
> PTLsim-devel at ptlsim.org
> https://ptlsim.org/mailman/listinfo/ptlsim-devel



More information about the PTLsim-devel mailing list