arch-x86: Stop "using namespace std"
Change-Id: I9763177bbd54abc97b99bd54a20a750e0adb5627 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/39557 Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br> Maintainer: Gabe Black <gabe.black@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -45,8 +45,6 @@
|
||||
#include "sim/byteswap.hh"
|
||||
#include "sim/sim_object.hh"
|
||||
|
||||
using namespace std;
|
||||
|
||||
const char X86ISA::ACPI::RSDP::signature[] = "RSD PTR ";
|
||||
|
||||
X86ISA::ACPI::RSDP::RSDP(const Params &p) : SimObject(p), oemID(p.oem_id),
|
||||
|
||||
@@ -41,7 +41,6 @@
|
||||
#include "mem/port_proxy.hh"
|
||||
#include "sim/byteswap.hh"
|
||||
|
||||
using namespace std;
|
||||
using namespace X86ISA;
|
||||
|
||||
template<class T>
|
||||
|
||||
@@ -63,8 +63,6 @@
|
||||
#include "params/X86IntelMPBusHierarchy.hh"
|
||||
#include "params/X86IntelMPCompatAddrSpaceMod.hh"
|
||||
|
||||
using namespace std;
|
||||
|
||||
const char X86ISA::IntelMP::FloatingPointer::signature[] = "_MP_";
|
||||
|
||||
template<class T>
|
||||
@@ -83,7 +81,7 @@ writeOutField(PortProxy& proxy, Addr addr, T val)
|
||||
}
|
||||
|
||||
uint8_t
|
||||
writeOutString(PortProxy& proxy, Addr addr, string str, int length)
|
||||
writeOutString(PortProxy& proxy, Addr addr, std::string str, int length)
|
||||
{
|
||||
char cleanedString[length + 1];
|
||||
cleanedString[length] = 0;
|
||||
@@ -210,7 +208,7 @@ X86ISA::IntelMP::ConfigTable::writeOut(PortProxy& proxy, Addr addr)
|
||||
proxy.writeBlob(addr + 43, &reserved, 1);
|
||||
checkSum += reserved;
|
||||
|
||||
vector<BaseConfigEntry *>::iterator baseEnt;
|
||||
std::vector<BaseConfigEntry *>::iterator baseEnt;
|
||||
uint16_t offset = 44;
|
||||
for (baseEnt = baseEntries.begin();
|
||||
baseEnt != baseEntries.end(); baseEnt++) {
|
||||
@@ -220,7 +218,7 @@ X86ISA::IntelMP::ConfigTable::writeOut(PortProxy& proxy, Addr addr)
|
||||
// We've found the end of the base table this point.
|
||||
checkSum += writeOutField(proxy, addr + 4, offset);
|
||||
|
||||
vector<ExtConfigEntry *>::iterator extEnt;
|
||||
std::vector<ExtConfigEntry *>::iterator extEnt;
|
||||
uint16_t extOffset = 0;
|
||||
uint8_t extCheckSum = 0;
|
||||
for (extEnt = extEntries.begin();
|
||||
|
||||
@@ -48,8 +48,6 @@
|
||||
#include "params/X86SMBiosSMBiosTable.hh"
|
||||
#include "sim/byteswap.hh"
|
||||
|
||||
using namespace std;
|
||||
|
||||
const char X86ISA::SMBios::SMBiosTable::SMBiosHeader::anchorString[] = "_SM_";
|
||||
const uint8_t X86ISA::SMBios::SMBiosTable::
|
||||
SMBiosHeader::formattedArea[] = {0,0,0,0,0};
|
||||
@@ -128,7 +126,7 @@ X86ISA::SMBios::SMBiosStructure::getStringLength()
|
||||
}
|
||||
|
||||
int
|
||||
X86ISA::SMBios::SMBiosStructure::addString(const string &new_string)
|
||||
X86ISA::SMBios::SMBiosStructure::addString(const std::string &new_string)
|
||||
{
|
||||
stringFields = true;
|
||||
// If a string is empty, treat it as not existing. The index for empty
|
||||
@@ -139,7 +137,7 @@ X86ISA::SMBios::SMBiosStructure::addString(const string &new_string)
|
||||
return strings.size();
|
||||
}
|
||||
|
||||
string
|
||||
std::string
|
||||
X86ISA::SMBios::SMBiosStructure::readString(int n)
|
||||
{
|
||||
assert(n > 0 && n <= strings.size());
|
||||
|
||||
@@ -126,6 +126,5 @@ output exec {{
|
||||
#include "sim/sim_exit.hh"
|
||||
|
||||
using namespace X86ISA;
|
||||
using namespace std;
|
||||
}};
|
||||
|
||||
|
||||
@@ -65,7 +65,6 @@
|
||||
#include "sim/syscall_return.hh"
|
||||
#include "sim/system.hh"
|
||||
|
||||
using namespace std;
|
||||
using namespace X86ISA;
|
||||
|
||||
template class MultiLevelPageTable<LongModePTE<47, 39>,
|
||||
@@ -112,9 +111,9 @@ X86_64Process::X86_64Process(const ProcessParams ¶ms,
|
||||
Addr next_thread_stack_base = stack_base - max_stack_size;
|
||||
Addr mmap_end = 0x7FFFF7FFF000ULL;
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
@@ -139,9 +138,9 @@ I386Process::I386Process(const ProcessParams ¶ms,
|
||||
Addr next_thread_stack_base = stack_base - max_stack_size;
|
||||
Addr mmap_end = 0xB7FFF000ULL;
|
||||
|
||||
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
|
||||
@@ -714,7 +713,7 @@ X86Process::argsInit(int pageSize,
|
||||
|
||||
std::vector<AuxVector<IntType>> auxv = extraAuxvs;
|
||||
|
||||
string filename;
|
||||
std::string filename;
|
||||
if (argv.size() < 1)
|
||||
filename = "";
|
||||
else
|
||||
@@ -850,7 +849,7 @@ X86Process::argsInit(int pageSize,
|
||||
const int numRandomBytes = 16;
|
||||
int aux_data_size = numRandomBytes;
|
||||
|
||||
string platform = "x86_64";
|
||||
std::string platform = "x86_64";
|
||||
aux_data_size += platform.size() + 1;
|
||||
|
||||
int env_data_size = 0;
|
||||
|
||||
@@ -58,7 +58,6 @@
|
||||
#include "mem/page_table.hh"
|
||||
#include "sim/full_system.hh"
|
||||
|
||||
using namespace std;
|
||||
using namespace X86ISA;
|
||||
|
||||
RemoteGDB::RemoteGDB(System *_system, ThreadContext *c, int _port) :
|
||||
|
||||
@@ -31,11 +31,11 @@
|
||||
#include "sim/serialize.hh"
|
||||
|
||||
using namespace X86ISA;
|
||||
using namespace std;
|
||||
|
||||
template <>
|
||||
void
|
||||
paramOut(CheckpointOut &cp, const string &name, ExtMachInst const &machInst)
|
||||
paramOut(CheckpointOut &cp, const std::string &name,
|
||||
ExtMachInst const &machInst)
|
||||
{
|
||||
// Prefixes
|
||||
paramOut(cp, name + ".legacy", (uint8_t)machInst.legacy);
|
||||
@@ -66,7 +66,7 @@ paramOut(CheckpointOut &cp, const string &name, ExtMachInst const &machInst)
|
||||
|
||||
template <>
|
||||
void
|
||||
paramIn(CheckpointIn &cp, const string &name, ExtMachInst &machInst)
|
||||
paramIn(CheckpointIn &cp, const std::string &name, ExtMachInst &machInst)
|
||||
{
|
||||
uint8_t temp8;
|
||||
// Prefixes
|
||||
|
||||
Reference in New Issue
Block a user