[PTLsim-devel] Big Issue queue not working properly rvn 225

abhishek
Fri Feb 29 13:36:41 EST 2008


Hi,

Guess found the bug finally. So, in accumop function in bitvecbase
the following line was incorrect w[word(i)] |= v << i;
It should be w[word(i)] |= v << bitof(i);


Now why only in some corner cases. Note this is on 32-bit machine so
size of v is 32 and if i >= 32, then compiler doesn't guarantee
behavior. Hence, if v = 1 and i = 32, you could get v << 32 = 1.

I'm attaching a patch file over rvn 228 (the patch can be applied over
rvn 225 also).

regards,
abhishek


On Wed, 2008-01-23 at 02:03 +0100, abhishek wrote:
> the attached file
> 
> On Wed, 2008-01-23 at 02:02 +0100, abhishek wrote:
> > Hi,
> > 
> > It seems issue queue of size greater than 32 (48 or 64 in my case) is
> > not working properly in some really corner cases. Issue Queue
> > slotof(issuq_tag_t tag) method return -1 even though slot exists. On
> > delving further it seems uopids.search() wasn't returning the right
> > value. So I guess the problem lies in
> > FullyAssociativeTags16bit::search() method.
> > 
> > I use 32-bit PTLsim userspace rvn 225. I'm attaching a test_case.cpp.
> > 
> > regards,
> > abhishek
> > 
> > _______________________________________________
> > PTLsim-devel mailing list
> > PTLsim-devel at ptlsim.org
> > https://ptlsim.org/mailman/listinfo/ptlsim-devel
> _______________________________________________
> PTLsim-devel mailing list
> PTLsim-devel at ptlsim.org
> https://ptlsim.org/mailman/listinfo/ptlsim-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ptlsim-big-bitvec-bug.diff
Type: text/x-patch
Size: 852 bytes
Desc: not available
Url : https://ptlsim.org/pipermail/ptlsim-devel/attachments/20080229/69369372/attachment.diff 


More information about the PTLsim-devel mailing list