Hi all,
I am currently trying to learn how the O3 cpu model is working. While reading the code, I have found this function (in src/cpu/o3/lsq_unit_impl.hh):

template <class Impl>
int
LSQUnit<Impl>::numLoadsReady()
{
    int load_idx = loadHead;
    int retval = 0;

    while (load_idx != loadTail) {
        assert(loadQueue[load_idx]);

        if (loadQueue[load_idx]->readyToIssue()) {
            ++retval;
        }
    }

    return retval;
}

As the load_idx is never changed, this is an infinite loop.

Fortunately, this function seems not to be used in the global code. But I think leaving a bug even in dead code is not a good idea.


Thanks,

Nathanaël Prémillieu
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to