Gabe Black has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/39556 )
Change subject: arch-power: Stop "using namespace std"
......................................................................
arch-power: Stop "using namespace std"
Change-Id: Iab8acba7c01a873db660304bb85661e75ffbe854
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/39556
Maintainer: Gabe Black <[email protected]>
Tested-by: kokoro <[email protected]>
Reviewed-by: Daniel Carvalho <[email protected]>
---
M src/arch/power/insts/integer.cc
M src/arch/power/process.cc
M src/arch/power/remote_gdb.cc
M src/arch/power/tlb.cc
4 files changed, 17 insertions(+), 21 deletions(-)
Approvals:
Daniel Carvalho: Looks good to me, approved
Gabe Black: Looks good to me, approved
kokoro: Regressions pass
diff --git a/src/arch/power/insts/integer.cc
b/src/arch/power/insts/integer.cc
index 8522153..febd469 100644
--- a/src/arch/power/insts/integer.cc
+++ b/src/arch/power/insts/integer.cc
@@ -28,19 +28,18 @@
#include "arch/power/insts/integer.hh"
-using namespace std;
using namespace PowerISA;
-string
+std::string
IntOp::generateDisassembly(Addr pc, const Loader::SymbolTable *symtab)
const
{
- stringstream ss;
+ std::stringstream ss;
bool printDest = true;
bool printSrcs = true;
bool printSecondSrc = true;
// Generate the correct mnemonic
- string myMnemonic(mnemonic);
+ std::string myMnemonic(mnemonic);
// Special cases
if (!myMnemonic.compare("or") && srcRegIdx(0) == srcRegIdx(1)) {
@@ -78,13 +77,13 @@
}
-string
+std::string
IntImmOp::generateDisassembly(Addr pc, const Loader::SymbolTable *symtab)
const
{
- stringstream ss;
+ std::stringstream ss;
// Generate the correct mnemonic
- string myMnemonic(mnemonic);
+ std::string myMnemonic(mnemonic);
// Special cases
if (!myMnemonic.compare("addi") && _numSrcRegs == 0) {
@@ -114,11 +113,11 @@
}
-string
+std::string
IntShiftOp::generateDisassembly(
Addr pc, const Loader::SymbolTable *symtab) const
{
- stringstream ss;
+ std::stringstream ss;
ccprintf(ss, "%-10s ", mnemonic);
@@ -142,11 +141,11 @@
}
-string
+std::string
IntRotateOp::generateDisassembly(
Addr pc, const Loader::SymbolTable *symtab) const
{
- stringstream ss;
+ std::stringstream ss;
ccprintf(ss, "%-10s ", mnemonic);
diff --git a/src/arch/power/process.cc b/src/arch/power/process.cc
index 9e8d2ad..26d28a8 100644
--- a/src/arch/power/process.cc
+++ b/src/arch/power/process.cc
@@ -43,7 +43,6 @@
#include "sim/syscall_return.hh"
#include "sim/system.hh"
-using namespace std;
using namespace PowerISA;
PowerProcess::PowerProcess(
@@ -67,9 +66,9 @@
// Set up region for mmaps. For now, start at bottom of kuseg space.
Addr mmap_end = 0x70000000L;
- memState = make_shared<MemState>(this, brk_point, stack_base,
- max_stack_size,
next_thread_stack_base,
- mmap_end);
+ memState = std::make_shared<MemState>(
+ this, brk_point, stack_base, max_stack_size,
+ next_thread_stack_base, mmap_end);
}
void
@@ -85,7 +84,7 @@
{
std::vector<AuxVector<uint32_t>> auxv;
- string filename;
+ std::string filename;
if (argv.size() < 1)
filename = "";
else
@@ -146,7 +145,7 @@
// A sentry NULL void pointer at the top of the stack.
int sentry_size = intSize;
- string platform = "v51";
+ std::string platform = "v51";
int platform_size = platform.size() + 1;
// The aux vectors are put on the stack in two groups. The first group
are
diff --git a/src/arch/power/remote_gdb.cc b/src/arch/power/remote_gdb.cc
index 661c431..ce9976f 100644
--- a/src/arch/power/remote_gdb.cc
+++ b/src/arch/power/remote_gdb.cc
@@ -143,7 +143,6 @@
#include "mem/page_table.hh"
#include "sim/byteswap.hh"
-using namespace std;
using namespace PowerISA;
RemoteGDB::RemoteGDB(System *_system, ThreadContext *tc, int _port)
diff --git a/src/arch/power/tlb.cc b/src/arch/power/tlb.cc
index dd3b50a..dca8d7b 100644
--- a/src/arch/power/tlb.cc
+++ b/src/arch/power/tlb.cc
@@ -48,7 +48,6 @@
#include "sim/full_system.hh"
#include "sim/process.hh"
-using namespace std;
using namespace PowerISA;
///////////////////////////////////////////////////////////////////////
@@ -168,7 +167,7 @@
table[Index]=pte;
// Update fast lookup table
- lookupTable.insert(make_pair(table[Index].VPN, Index));
+ lookupTable.insert(std::make_pair(table[Index].VPN, Index));
}
}
@@ -209,7 +208,7 @@
for (int i = 0; i < size; i++) {
ScopedCheckpointSection sec(cp, csprintf("PTE%d", i));
if (table[i].V0 || table[i].V1) {
- lookupTable.insert(make_pair(table[i].VPN, i));
+ lookupTable.insert(std::make_pair(table[i].VPN, i));
}
}
}
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/39556
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Iab8acba7c01a873db660304bb85661e75ffbe854
Gerrit-Change-Number: 39556
Gerrit-PatchSet: 7
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-Reviewer: Boris Shingarov <[email protected]>
Gerrit-Reviewer: Daniel Carvalho <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s