From 9341051b9a113d0735b5fe72be48e1d822fd178d Mon Sep 17 00:00:00 2001 From: "Daniel R. Carvalho" Date: Thu, 6 May 2021 20:33:04 -0300 Subject: [PATCH] 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 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45426 Tested-by: kokoro Reviewed-by: Hoa Nguyen Maintainer: Gabe Black --- src/arch/generic/decode_cache.hh | 4 ++-- src/arch/riscv/decoder.hh | 2 +- src/arch/x86/decoder.hh | 8 ++++---- src/cpu/decode_cache.hh | 6 ++++-- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/arch/generic/decode_cache.hh b/src/arch/generic/decode_cache.hh index 84f90ca3ef..b4caa72978 100644 --- a/src/arch/generic/decode_cache.hh +++ b/src/arch/generic/decode_cache.hh @@ -40,13 +40,13 @@ template class BasicDecodeCache { private: - DecodeCache::InstMap instMap; + decode_cache::InstMap instMap; struct AddrMapEntry { StaticInstPtr inst; EMI machInst; }; - DecodeCache::AddrMap decodePages; + decode_cache::AddrMap decodePages; public: /// Decode a machine instruction. diff --git a/src/arch/riscv/decoder.hh b/src/arch/riscv/decoder.hh index 9b3873db0d..932c4f2639 100644 --- a/src/arch/riscv/decoder.hh +++ b/src/arch/riscv/decoder.hh @@ -45,7 +45,7 @@ class ISA; class Decoder : public InstDecoder { private: - DecodeCache::InstMap instMap; + decode_cache::InstMap instMap; bool aligned; bool mid; bool more; diff --git a/src/arch/x86/decoder.hh b/src/arch/x86/decoder.hh index 5bea939e0f..b43cf34b14 100644 --- a/src/arch/x86/decoder.hh +++ b/src/arch/x86/decoder.hh @@ -234,14 +234,14 @@ class Decoder : public InstDecoder typedef RegVal CacheKey; - typedef DecodeCache::AddrMap DecodePages; + typedef decode_cache::AddrMap DecodePages; DecodePages *decodePages = nullptr; typedef std::unordered_map AddrCacheMap; AddrCacheMap addrCacheMap; - DecodeCache::InstMap *instMap = nullptr; + decode_cache::InstMap *instMap = nullptr; typedef std::unordered_map< - CacheKey, DecodeCache::InstMap *> InstCacheMap; + CacheKey, decode_cache::InstMap *> 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; + instMap = new decode_cache::InstMap; instCacheMap[m5Reg] = instMap; } } diff --git a/src/cpu/decode_cache.hh b/src/cpu/decode_cache.hh index 20b6783d2d..acaa8ca407 100644 --- a/src/cpu/decode_cache.hh +++ b/src/cpu/decode_cache.hh @@ -32,9 +32,11 @@ #include #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__