Deleted Added
sdiff udiff text old ( 12334:e0ab29a34764 ) new ( 12621:982f22db6230 )
full compact
1/*
2 * Copyright (c) 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;

--- 215 unchanged lines hidden (view full) ---

224
225 typedef MiscReg CacheKey;
226
227 typedef DecodeCache::AddrMap<Decoder::InstBytes> DecodePages;
228 DecodePages *decodePages;
229 typedef std::unordered_map<CacheKey, DecodePages *> AddrCacheMap;
230 AddrCacheMap addrCacheMap;
231
232 DecodeCache::InstMap<ExtMachInst> *instMap;
233 typedef std::unordered_map<
234 CacheKey, DecodeCache::InstMap<ExtMachInst> *> InstCacheMap;
235 static InstCacheMap instCacheMap;
236
237 public:
238 Decoder(ISA* isa = nullptr) : basePC(0), origPC(0), offset(0),
239 outOfBytes(true), instDone(false),
240 state(ResetState)
241 {
242 memset(&emi, 0, sizeof(emi));

--- 30 unchanged lines hidden (view full) ---

273 decodePages = new DecodePages;
274 addrCacheMap[m5Reg] = decodePages;
275 }
276
277 InstCacheMap::iterator imIter = instCacheMap.find(m5Reg);
278 if (imIter != instCacheMap.end()) {
279 instMap = imIter->second;
280 } else {
281 instMap = new DecodeCache::InstMap<ExtMachInst>;
282 instCacheMap[m5Reg] = instMap;
283 }
284 }
285
286 void takeOverFrom(Decoder *old)
287 {
288 mode = old->mode;
289 submode = old->submode;

--- 65 unchanged lines hidden ---