Put the ProcessInfo and StackTrace objects into the ISA namespaces.

--HG--
extra : convert_revision : 1626703583f02a1c9823874290462c1b6bdb6c3c
This commit is contained in:
Gabe Black 2006-11-08 00:52:04 -05:00
parent 16a012e80d
commit f1a55570d3
6 changed files with 683 additions and 670 deletions

View file

@ -40,8 +40,9 @@
#include "sim/system.hh" #include "sim/system.hh"
using namespace std; using namespace std;
using namespace AlphaISA;
namespace AlphaISA
{
ProcessInfo::ProcessInfo(ThreadContext *_tc) ProcessInfo::ProcessInfo(ThreadContext *_tc)
: tc(_tc) : tc(_tc)
{ {
@ -366,3 +367,4 @@ StackTrace::dump()
} }
} }
#endif #endif
}

View file

@ -35,6 +35,9 @@
#include "cpu/static_inst.hh" #include "cpu/static_inst.hh"
class ThreadContext; class ThreadContext;
namespace AlphaISA
{
class StackTrace; class StackTrace;
class ProcessInfo class ProcessInfo
@ -117,5 +120,6 @@ StackTrace::trace(ThreadContext *tc, StaticInstPtr inst)
trace(tc, !inst->isReturn()); trace(tc, !inst->isReturn());
return true; return true;
} }
}
#endif // __ARCH_ALPHA_STACKTRACE_HH__ #endif // __ARCH_ALPHA_STACKTRACE_HH__

View file

@ -40,8 +40,8 @@
#include "sim/system.hh" #include "sim/system.hh"
using namespace std; using namespace std;
using namespace SparcISA; namespace SparcISA
{
ProcessInfo::ProcessInfo(ThreadContext *_tc) ProcessInfo::ProcessInfo(ThreadContext *_tc)
: tc(_tc) : tc(_tc)
{ {
@ -369,3 +369,4 @@ StackTrace::dump()
} }
} }
#endif #endif
}

View file

@ -35,6 +35,8 @@
#include "cpu/static_inst.hh" #include "cpu/static_inst.hh"
class ThreadContext; class ThreadContext;
namespace SparcISA
{
class StackTrace; class StackTrace;
class ProcessInfo class ProcessInfo
@ -117,5 +119,6 @@ StackTrace::trace(ThreadContext *tc, StaticInstPtr inst)
trace(tc, !inst->isReturn()); trace(tc, !inst->isReturn());
return true; return true;
} }
}
#endif // __ARCH_SPARC_STACKTRACE_HH__ #endif // __ARCH_SPARC_STACKTRACE_HH__

View file

@ -33,9 +33,9 @@
#include <map> #include <map>
#include "arch/stacktrace.hh"
#include "cpu/static_inst.hh" #include "cpu/static_inst.hh"
#include "sim/host.hh" #include "sim/host.hh"
#include "arch/stacktrace.hh"
class ThreadContext; class ThreadContext;
@ -66,7 +66,7 @@ class FunctionProfile
const SymbolTable *symtab; const SymbolTable *symtab;
ProfileNode top; ProfileNode top;
std::map<Addr, Counter> pc_count; std::map<Addr, Counter> pc_count;
StackTrace trace; TheISA::StackTrace trace;
public: public:
FunctionProfile(const SymbolTable *symtab); FunctionProfile(const SymbolTable *symtab);

View file

@ -28,6 +28,9 @@
* Authors: Ali Saidi * Authors: Ali Saidi
*/ */
//To get endianness
#include "arch/isa_traits.hh"
#include "mem/port.hh" #include "mem/port.hh"
#include "sim/byteswap.hh" #include "sim/byteswap.hh"
@ -35,7 +38,7 @@ template <typename T>
void void
FunctionalPort::writeHtoG(Addr addr, T d) FunctionalPort::writeHtoG(Addr addr, T d)
{ {
d = htog(d); d = TheISA::htog(d);
writeBlob(addr, (uint8_t*)&d, sizeof(T)); writeBlob(addr, (uint8_t*)&d, sizeof(T));
} }
@ -46,6 +49,6 @@ FunctionalPort::readGtoH(Addr addr)
{ {
T d; T d;
readBlob(addr, (uint8_t*)&d, sizeof(T)); readBlob(addr, (uint8_t*)&d, sizeof(T));
return gtoh(d); return TheISA::gtoh(d);
} }