decode_cache.cc (11793:ef606668d247) | decode_cache.cc (12621:982f22db6230) |
---|---|
1/* 2 * Copyright (c) 2011-2012 Google 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 32 unchanged lines hidden (view full) --- 41StaticInstPtr 42BasicDecodeCache::decode(TheISA::Decoder *decoder, 43 TheISA::ExtMachInst mach_inst, Addr addr) 44{ 45 StaticInstPtr &si = decodePages.lookup(addr); 46 if (si && (si->machInst == mach_inst)) 47 return si; 48 | 1/* 2 * Copyright (c) 2011-2012 Google 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 32 unchanged lines hidden (view full) --- 41StaticInstPtr 42BasicDecodeCache::decode(TheISA::Decoder *decoder, 43 TheISA::ExtMachInst mach_inst, Addr addr) 44{ 45 StaticInstPtr &si = decodePages.lookup(addr); 46 if (si && (si->machInst == mach_inst)) 47 return si; 48 |
49 DecodeCache::InstMap::iterator iter = instMap.find(mach_inst); | 49 auto iter = instMap.find(mach_inst); |
50 if (iter != instMap.end()) { 51 si = iter->second; 52 return si; 53 } 54 55 si = decoder->decodeInst(mach_inst); 56 instMap[mach_inst] = si; 57 return si; 58} 59 60} // namespace GenericISA | 50 if (iter != instMap.end()) { 51 si = iter->second; 52 return si; 53 } 54 55 si = decoder->decodeInst(mach_inst); 56 instMap[mach_inst] = si; 57 return si; 58} 59 60} // namespace GenericISA |