diff options
author | Vincentius Robby <acolyte@umich.edu> | 2007-08-08 14:18:09 -0400 |
---|---|---|
committer | Vincentius Robby <acolyte@umich.edu> | 2007-08-08 14:18:09 -0400 |
commit | 13d10e844c7465b4f7375da6e196cd36ffd0e37d (patch) | |
tree | 5ce24f04043b232bb7a658884f5e8adbf7f68d2e /src/cpu/static_inst.hh | |
parent | ef32494e723283c5a0a8c27bcb657a0e9ca9e25c (diff) | |
download | gem5-13d10e844c7465b4f7375da6e196cd36ffd0e37d.tar.xz |
alpha: Make the TLB cache to actually work.
Improve MRU checking for StaticInst, Bus, TLB
--HG--
extra : convert_revision : 9116b5655cd2986aeb4205438aad4a0f5a440006
Diffstat (limited to 'src/cpu/static_inst.hh')
-rw-r--r-- | src/cpu/static_inst.hh | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/src/cpu/static_inst.hh b/src/cpu/static_inst.hh index 2e1ebd766..c4a29da59 100644 --- a/src/cpu/static_inst.hh +++ b/src/cpu/static_inst.hh @@ -597,20 +597,19 @@ StaticInst::decode(StaticInst::ExtMachInst mach_inst, Addr addr) Addr page_addr = addr & ~(TheISA::PageBytes - 1); // checks recently decoded addresses - if (recentDecodes[0].decodePage && - page_addr == recentDecodes[0].page_addr) { - if (recentDecodes[0].decodePage->decoded(mach_inst, addr)) - return recentDecodes[0].decodePage->getInst(addr); - - return searchCache(mach_inst, addr, recentDecodes[0].decodePage); - } - - if (recentDecodes[1].decodePage && - page_addr == recentDecodes[1].page_addr) { - if (recentDecodes[1].decodePage->decoded(mach_inst, addr)) - return recentDecodes[1].decodePage->getInst(addr); - - return searchCache(mach_inst, addr, recentDecodes[1].decodePage); + if (recentDecodes[0].decodePage) { + if (page_addr == recentDecodes[0].page_addr) { + if (recentDecodes[0].decodePage->decoded(mach_inst, addr)) + return recentDecodes[0].decodePage->getInst(addr); + + return searchCache(mach_inst, addr, recentDecodes[0].decodePage); + } else if (recentDecodes[1].decodePage && + page_addr == recentDecodes[1].page_addr) { + if (recentDecodes[1].decodePage->decoded(mach_inst, addr)) + return recentDecodes[1].decodePage->getInst(addr); + + return searchCache(mach_inst, addr, recentDecodes[1].decodePage); + } } // searches the page containing the address to decode |