[PTLsim-devel] regarding maskop in rvn 118

abhishek
Mon Jan 21 17:33:22 EST 2008


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




More information about the PTLsim-devel mailing list