Bus: Only update port cache when there is an item to update it with.

--HG--
extra : convert_revision : 84848fd48bb9e6693a0518c862364142b1969aa8
This commit is contained in:
Nicolas Zea 2008-02-10 19:41:03 -05:00
parent d167e2bb97
commit 4c7eb21119

View file

@ -307,9 +307,10 @@ Bus::findPort(Addr addr)
dest_id = checkPortCache(addr); dest_id = checkPortCache(addr);
if (dest_id == -1) { if (dest_id == -1) {
PortIter i = portMap.find(RangeSize(addr,1)); PortIter i = portMap.find(RangeSize(addr,1));
if (i != portMap.end()) if (i != portMap.end()) {
dest_id = i->second; dest_id = i->second;
updatePortCache(dest_id, i->first.start, i->first.end); updatePortCache(dest_id, i->first.start, i->first.end);
}
} }
// Check if this matches the default range // Check if this matches the default range