arch,cpu: Rename DecodeCache namespace as decode_cache

As part of recent decisions regarding namespace
naming conventions, all namespaces will be changed
to snake case.

::DecodeCache became ::decode_cache.

Change-Id: Ia2b89b3fd802aae72a391786f7ea0a045de1fc2a
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45426
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Maintainer: Gabe Black <gabe.black@gmail.com>
This commit is contained in:
Daniel R. Carvalho
2021-05-06 20:33:04 -03:00
committed by Daniel Carvalho
parent 2feca3388f
commit 9341051b9a
4 changed files with 11 additions and 9 deletions

View File

@@ -40,13 +40,13 @@ template <typename Decoder, typename EMI>
class BasicDecodeCache
{
private:
DecodeCache::InstMap<EMI> instMap;
decode_cache::InstMap<EMI> instMap;
struct AddrMapEntry
{
StaticInstPtr inst;
EMI machInst;
};
DecodeCache::AddrMap<AddrMapEntry> decodePages;
decode_cache::AddrMap<AddrMapEntry> decodePages;
public:
/// Decode a machine instruction.

View File

@@ -45,7 +45,7 @@ class ISA;
class Decoder : public InstDecoder
{
private:
DecodeCache::InstMap<ExtMachInst> instMap;
decode_cache::InstMap<ExtMachInst> instMap;
bool aligned;
bool mid;
bool more;

View File

@@ -234,14 +234,14 @@ class Decoder : public InstDecoder
typedef RegVal CacheKey;
typedef DecodeCache::AddrMap<Decoder::InstBytes> DecodePages;
typedef decode_cache::AddrMap<Decoder::InstBytes> DecodePages;
DecodePages *decodePages = nullptr;
typedef std::unordered_map<CacheKey, DecodePages *> AddrCacheMap;
AddrCacheMap addrCacheMap;
DecodeCache::InstMap<ExtMachInst> *instMap = nullptr;
decode_cache::InstMap<ExtMachInst> *instMap = nullptr;
typedef std::unordered_map<
CacheKey, DecodeCache::InstMap<ExtMachInst> *> InstCacheMap;
CacheKey, decode_cache::InstMap<ExtMachInst> *> InstCacheMap;
static InstCacheMap instCacheMap;
StaticInstPtr decodeInst(ExtMachInst mach_inst);
@@ -284,7 +284,7 @@ class Decoder : public InstDecoder
if (imIter != instCacheMap.end()) {
instMap = imIter->second;
} else {
instMap = new DecodeCache::InstMap<ExtMachInst>;
instMap = new decode_cache::InstMap<ExtMachInst>;
instCacheMap[m5Reg] = instMap;
}
}

View File

@@ -32,9 +32,11 @@
#include <unordered_map>
#include "base/bitfield.hh"
#include "base/compiler.hh"
#include "cpu/static_inst_fwd.hh"
namespace DecodeCache
GEM5_DEPRECATED_NAMESPACE(DecodeCache, decode_cache);
namespace decode_cache
{
/// Hash for decoded instructions.
@@ -131,6 +133,6 @@ class AddrMap
}
};
} // namespace DecodeCache
} // namespace decode_cache
#endif // __CPU_DECODE_CACHE_HH__