arch-power: Stop "using namespace std"

Change-Id: Iab8acba7c01a873db660304bb85661e75ffbe854
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/39556
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
This commit is contained in:
Gabe Black
2021-01-21 02:58:31 -08:00
parent 2d2f227e1d
commit 7594dc0715
4 changed files with 17 additions and 21 deletions

View File

@@ -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 @@ IntOp::generateDisassembly(Addr pc, const Loader::SymbolTable *symtab) const
}
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 @@ IntImmOp::generateDisassembly(Addr pc, const Loader::SymbolTable *symtab) const
}
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 @@ IntShiftOp::generateDisassembly(
}
string
std::string
IntRotateOp::generateDisassembly(
Addr pc, const Loader::SymbolTable *symtab) const
{
stringstream ss;
std::stringstream ss;
ccprintf(ss, "%-10s ", mnemonic);

View File

@@ -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 @@ PowerProcess::PowerProcess(
// 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 @@ PowerProcess::argsInit(int intSize, int pageSize)
{
std::vector<AuxVector<uint32_t>> auxv;
string filename;
std::string filename;
if (argv.size() < 1)
filename = "";
else
@@ -146,7 +145,7 @@ PowerProcess::argsInit(int intSize, int pageSize)
// 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

View File

@@ -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)

View File

@@ -48,7 +48,6 @@
#include "sim/full_system.hh"
#include "sim/process.hh"
using namespace std;
using namespace PowerISA;
///////////////////////////////////////////////////////////////////////
@@ -168,7 +167,7 @@ TLB::insertAt(PowerISA::PTE &pte, unsigned Index, int _smallPages)
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 @@ TLB::unserialize(CheckpointIn &cp)
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));
}
}
}