Made Addr a global type

--HG--
extra : convert_revision : 869bd9fa5d8591115ac9b4a7401eb2490986b835
This commit is contained in:
Gabe Black 2006-02-21 03:38:21 -05:00
parent 74d7cd1cea
commit 3f7979c99d
50 changed files with 58 additions and 143 deletions

View file

@ -42,7 +42,6 @@ class ExecContext;
class AlphaTLB : public SimObject class AlphaTLB : public SimObject
{ {
protected: protected:
typedef TheISA::Addr Addr;
typedef std::multimap<Addr, int> PageTable; typedef std::multimap<Addr, int> PageTable;
PageTable lookupTable; // Quick lookup into page table PageTable lookupTable; // Quick lookup into page table
@ -83,7 +82,6 @@ class AlphaTLB : public SimObject
class AlphaITB : public AlphaTLB class AlphaITB : public AlphaTLB
{ {
protected: protected:
typedef TheISA::Addr Addr;
mutable Stats::Scalar<> hits; mutable Stats::Scalar<> hits;
mutable Stats::Scalar<> misses; mutable Stats::Scalar<> misses;
mutable Stats::Scalar<> acv; mutable Stats::Scalar<> acv;

View file

@ -34,14 +34,12 @@
class AlphaFault : public Fault class AlphaFault : public Fault
{ {
protected:
typedef TheISA::Addr Addr;
public: public:
AlphaFault(char * newName, int newId, Addr newVect) AlphaFault(char * newName, int newId, Addr newVect)
: Fault(newName, newId), vect(newVect) : Fault(newName, newId), vect(newVect)
{;} {;}
TheISA::Addr vect; Addr vect;
}; };
extern class ResetFaultType : public AlphaFault extern class ResetFaultType : public AlphaFault

View file

@ -39,8 +39,6 @@ output header {{
*/ */
class PCDependentDisassembly : public AlphaStaticInst class PCDependentDisassembly : public AlphaStaticInst
{ {
protected:
typedef TheISA::Addr Addr;
protected: protected:
/// Cached program counter from last disassembly /// Cached program counter from last disassembly
mutable Addr cachedPC; mutable Addr cachedPC;
@ -66,7 +64,6 @@ output header {{
class Branch : public PCDependentDisassembly class Branch : public PCDependentDisassembly
{ {
protected: protected:
typedef TheISA::Addr Addr;
/// Displacement to target address (signed). /// Displacement to target address (signed).
int32_t disp; int32_t disp;
@ -90,7 +87,6 @@ output header {{
class Jump : public PCDependentDisassembly class Jump : public PCDependentDisassembly
{ {
protected: protected:
typedef TheISA::Addr Addr;
/// Displacement to target address (signed). /// Displacement to target address (signed).
int32_t disp; int32_t disp;

View file

@ -56,7 +56,7 @@ namespace AlphaISA
{ {
typedef uint32_t MachInst; typedef uint32_t MachInst;
typedef uint64_t Addr; // typedef uint64_t Addr;
typedef uint8_t RegIndex; typedef uint8_t RegIndex;
enum { enum {

View file

@ -37,8 +37,6 @@ class StackTrace;
class ProcessInfo class ProcessInfo
{ {
protected:
typedef TheISA::Addr Addr;
private: private:
ExecContext *xc; ExecContext *xc;
@ -59,7 +57,6 @@ class ProcessInfo
class StackTrace class StackTrace
{ {
protected: protected:
typedef TheISA::Addr Addr;
typedef TheISA::MachInst MachInst; typedef TheISA::MachInst MachInst;
private: private:
ExecContext *xc; ExecContext *xc;

View file

@ -35,16 +35,16 @@ class ExecContext;
class PhysicalMemory; class PhysicalMemory;
AlphaISA::PageTableEntry AlphaISA::PageTableEntry
kernel_pte_lookup(PhysicalMemory *pmem, AlphaISA::Addr ptbr, AlphaISA::VAddr vaddr); kernel_pte_lookup(PhysicalMemory *pmem, Addr ptbr, AlphaISA::VAddr vaddr);
AlphaISA::Addr vtophys(PhysicalMemory *xc, AlphaISA::Addr vaddr); Addr vtophys(PhysicalMemory *xc, Addr vaddr);
AlphaISA::Addr vtophys(ExecContext *xc, AlphaISA::Addr vaddr); Addr vtophys(ExecContext *xc, Addr vaddr);
uint8_t *vtomem(ExecContext *xc, AlphaISA::Addr vaddr, size_t len); uint8_t *vtomem(ExecContext *xc, Addr vaddr, size_t len);
uint8_t *ptomem(ExecContext *xc, AlphaISA::Addr paddr, size_t len); uint8_t *ptomem(ExecContext *xc, Addr paddr, size_t len);
void CopyOut(ExecContext *xc, void *dst, AlphaISA::Addr src, size_t len); void CopyOut(ExecContext *xc, void *dst, Addr src, size_t len);
void CopyIn(ExecContext *xc, AlphaISA::Addr dst, void *src, size_t len); void CopyIn(ExecContext *xc, Addr dst, void *src, size_t len);
void CopyString(ExecContext *xc, char *dst, AlphaISA::Addr vaddr, size_t maxlen); void CopyString(ExecContext *xc, char *dst, Addr vaddr, size_t maxlen);
#endif // __ARCH_ALPHA_VTOPHYS_H__ #endif // __ARCH_ALPHA_VTOPHYS_H__

View file

@ -37,7 +37,6 @@ class SymbolTable;
class ObjectFile class ObjectFile
{ {
public: public:
typedef TheISA::Addr Addr;
enum Arch { enum Arch {
UnknownArch, UnknownArch,

View file

@ -37,9 +37,8 @@
class Checkpoint; class Checkpoint;
class SymbolTable class SymbolTable
{ {
typedef TheISA::Addr Addr;
public: public:
typedef std::map<TheISA::Addr, std::string> ATable; typedef std::map<Addr, std::string> ATable;
typedef std::map<std::string, Addr> STable; typedef std::map<std::string, Addr> STable;
private: private:

View file

@ -44,7 +44,6 @@ class GDBListener;
class RemoteGDB class RemoteGDB
{ {
protected: protected:
typedef TheISA::Addr Addr;
typedef TheISA::MachInst MachInst; typedef TheISA::MachInst MachInst;
private: private:
friend void debugger(); friend void debugger();

View file

@ -48,7 +48,6 @@ class ExecContext;
class BaseCPU : public SimObject class BaseCPU : public SimObject
{ {
protected: protected:
typedef TheISA::Addr Addr;
// CPU's clock period in terms of the number of ticks of curTime. // CPU's clock period in terms of the number of ticks of curTime.
Tick clock; Tick clock;

View file

@ -62,8 +62,6 @@ class BaseDynInst : public FastAlloc, public RefCounted
/// Binary machine instruction type. /// Binary machine instruction type.
typedef TheISA::MachInst MachInst; typedef TheISA::MachInst MachInst;
/// Memory address type.
typedef TheISA::Addr Addr;
/// Logical register index type. /// Logical register index type.
typedef TheISA::RegIndex RegIndex; typedef TheISA::RegIndex RegIndex;
/// Integer register index type. /// Integer register index type.

View file

@ -69,7 +69,6 @@ class ExecContext
{ {
protected: protected:
typedef TheISA::RegFile RegFile; typedef TheISA::RegFile RegFile;
typedef TheISA::Addr Addr;
typedef TheISA::MachInst MachInst; typedef TheISA::MachInst MachInst;
typedef TheISA::MiscRegFile MiscRegFile; typedef TheISA::MiscRegFile MiscRegFile;
public: public:

View file

@ -46,7 +46,6 @@ namespace Trace {
class InstRecord : public Record class InstRecord : public Record
{ {
protected: protected:
typedef TheISA::Addr Addr;
typedef TheISA::IntRegFile IntRegFile; typedef TheISA::IntRegFile IntRegFile;
// The following fields are initialized by the constructor and // The following fields are initialized by the constructor and
@ -172,7 +171,7 @@ inline
InstRecord * InstRecord *
getInstRecord(Tick cycle, ExecContext *xc, BaseCPU *cpu, getInstRecord(Tick cycle, ExecContext *xc, BaseCPU *cpu,
const StaticInstPtr staticInst, const StaticInstPtr staticInst,
TheISA::Addr pc, int thread = 0) Addr pc, int thread = 0)
{ {
if (DTRACE(InstExec) && if (DTRACE(InstExec) &&
(InstRecord::traceMisspec() || !xc->misspeculating())) { (InstRecord::traceMisspec() || !xc->misspeculating())) {

View file

@ -42,8 +42,6 @@
class ExecContext; class ExecContext;
class MemTest : public SimObject class MemTest : public SimObject
{ {
protected:
typedef TheISA::Addr Addr;
public: public:
MemTest(const std::string &name, MemTest(const std::string &name,

View file

@ -35,8 +35,6 @@
class DefaultBP class DefaultBP
{ {
protected:
typedef TheISA::Addr Addr;
public: public:
/** /**
* Default branch predictor constructor. * Default branch predictor constructor.

View file

@ -40,7 +40,6 @@ template <class Impl>
class AlphaFullCPU : public FullO3CPU<Impl> class AlphaFullCPU : public FullO3CPU<Impl>
{ {
protected: protected:
typedef AlphaISA::Addr Addr;
typedef TheISA::IntReg IntReg; typedef TheISA::IntReg IntReg;
public: public:
typedef typename Impl::Params Params; typedef typename Impl::Params Params;

View file

@ -50,8 +50,6 @@ class AlphaDynInst : public BaseDynInst<Impl>
/** Binary machine instruction type. */ /** Binary machine instruction type. */
typedef TheISA::MachInst MachInst; typedef TheISA::MachInst MachInst;
/** Memory address type. */
typedef TheISA::Addr Addr;
/** Logical register index type. */ /** Logical register index type. */
typedef TheISA::RegIndex RegIndex; typedef TheISA::RegIndex RegIndex;
/** Integer register index type. */ /** Integer register index type. */

View file

@ -53,8 +53,6 @@
template<class Impl> template<class Impl>
class TwobitBPredUnit class TwobitBPredUnit
{ {
protected:
typedef TheISA::Addr Addr;
public: public:
typedef typename Impl::Params Params; typedef typename Impl::Params Params;
typedef typename Impl::DynInstPtr DynInstPtr; typedef typename Impl::DynInstPtr DynInstPtr;

View file

@ -34,8 +34,6 @@
class DefaultBTB class DefaultBTB
{ {
protected:
typedef TheISA::Addr Addr;
private: private:
struct BTBEntry struct BTBEntry
{ {

View file

@ -49,9 +49,6 @@ class SimpleDecode
typedef typename CPUPol::DecodeStruct DecodeStruct; typedef typename CPUPol::DecodeStruct DecodeStruct;
typedef typename CPUPol::TimeStruct TimeStruct; typedef typename CPUPol::TimeStruct TimeStruct;
// Typedefs from the ISA.
typedef TheISA::Addr Addr;
public: public:
// The only time decode will become blocked is if dispatch becomes // The only time decode will become blocked is if dispatch becomes
// blocked, which means IQ or ROB is probably full. // blocked, which means IQ or ROB is probably full.

View file

@ -61,7 +61,6 @@ class SimpleFetch
/** Typedefs from ISA. */ /** Typedefs from ISA. */
typedef TheISA::MachInst MachInst; typedef TheISA::MachInst MachInst;
typedef TheISA::Addr Addr;
public: public:
enum Status { enum Status {

View file

@ -34,8 +34,6 @@
class ReturnAddrStack class ReturnAddrStack
{ {
protected:
typedef TheISA::Addr Addr;
public: public:
ReturnAddrStack(unsigned numEntries); ReturnAddrStack(unsigned numEntries);

View file

@ -53,7 +53,6 @@ template <class Impl>
class PhysRegFile class PhysRegFile
{ {
protected: protected:
typedef TheISA::Addr Addr;
typedef TheISA::IntReg IntReg; typedef TheISA::IntReg IntReg;
typedef TheISA::FloatReg FloatReg; typedef TheISA::FloatReg FloatReg;
typedef TheISA::MiscRegFile MiscRegFile; typedef TheISA::MiscRegFile MiscRegFile;

View file

@ -61,7 +61,6 @@ class SimpleRename
typedef typename CPUPol::RenameMap RenameMap; typedef typename CPUPol::RenameMap RenameMap;
// Typedefs from the ISA. // Typedefs from the ISA.
typedef TheISA::Addr Addr;
typedef TheISA::RegIndex RegIndex; typedef TheISA::RegIndex RegIndex;
public: public:

View file

@ -36,8 +36,6 @@
class StoreSet class StoreSet
{ {
protected:
typedef TheISA::Addr Addr;
public: public:
typedef unsigned SSID; typedef unsigned SSID;

View file

@ -35,8 +35,6 @@
class TournamentBP class TournamentBP
{ {
protected:
typedef TheISA::Addr Addr;
public: public:
/** /**
* Default branch predictor constructor. * Default branch predictor constructor.

View file

@ -136,14 +136,14 @@ BreakPCEvent::process(ExecContext *xc)
#if FULL_SYSTEM #if FULL_SYSTEM
extern "C" extern "C"
void void
sched_break_pc_sys(System *sys, TheISA::Addr addr) sched_break_pc_sys(System *sys, Addr addr)
{ {
new BreakPCEvent(&sys->pcEventQueue, "debug break", addr, true); new BreakPCEvent(&sys->pcEventQueue, "debug break", addr, true);
} }
extern "C" extern "C"
void void
sched_break_pc(TheISA::Addr addr) sched_break_pc(Addr addr)
{ {
for (vector<System *>::iterator sysi = System::systemList.begin(); for (vector<System *>::iterator sysi = System::systemList.begin();
sysi != System::systemList.end(); ++sysi) { sysi != System::systemList.end(); ++sysi) {

View file

@ -39,7 +39,6 @@ class PCEventQueue;
class PCEvent class PCEvent
{ {
protected: protected:
typedef TheISA::Addr Addr;
static const Addr badpc = MemReq::inval_addr; static const Addr badpc = MemReq::inval_addr;
protected: protected:
@ -65,7 +64,6 @@ class PCEvent
class PCEventQueue class PCEventQueue
{ {
protected: protected:
typedef TheISA::Addr Addr;
typedef PCEvent * record_t; typedef PCEvent * record_t;
class MapCompare { class MapCompare {
public: public:
@ -134,7 +132,6 @@ PCEvent::remove()
class BreakPCEvent : public PCEvent class BreakPCEvent : public PCEvent
{ {
protected: protected:
typedef TheISA::Addr Addr;
bool remove; bool remove;
public: public:

View file

@ -37,8 +37,6 @@
class ProfileNode class ProfileNode
{ {
protected:
typedef TheISA::Addr Addr;
private: private:
friend class FunctionProfile; friend class FunctionProfile;
@ -59,8 +57,6 @@ class ProfileNode
class Callback; class Callback;
class FunctionProfile class FunctionProfile
{ {
public:
typedef TheISA::Addr Addr;
private: private:
Callback *reset; Callback *reset;
const SymbolTable *symtab; const SymbolTable *symtab;

View file

@ -229,8 +229,6 @@ class StaticInst : public StaticInstBase
/// Binary machine instruction type. /// Binary machine instruction type.
typedef TheISA::MachInst MachInst; typedef TheISA::MachInst MachInst;
/// Memory address type.
typedef TheISA::Addr Addr;
/// Logical register index type. /// Logical register index type.
typedef TheISA::RegIndex RegIndex; typedef TheISA::RegIndex RegIndex;

View file

@ -49,8 +49,6 @@ class MemTraceReader;
*/ */
class OptCPU : public SimObject class OptCPU : public SimObject
{ {
protected:
typedef TheISA::Addr Addr;
private: private:
typedef int RefIndex; typedef int RefIndex;

View file

@ -46,8 +46,6 @@
*/ */
class ITXReader : public MemTraceReader class ITXReader : public MemTraceReader
{ {
protected:
typedef TheISA::Addr Addr;
private: private:
/** Trace file. */ /** Trace file. */
FILE *trace; FILE *trace;

View file

@ -187,8 +187,6 @@ class IdeController;
*/ */
class IdeDisk : public SimObject class IdeDisk : public SimObject
{ {
protected:
typedef TheISA::Addr Addr;
protected: protected:
/** The IDE controller for this disk. */ /** The IDE controller for this disk. */
IdeController *ctrl; IdeController *ctrl;

View file

@ -53,8 +53,6 @@ class MemoryController;
*/ */
class PciConfigData : public SimObject class PciConfigData : public SimObject
{ {
protected:
typedef TheISA::Addr Addr;
public: public:
/** /**
* Constructor to initialize the devices config space to 0. * Constructor to initialize the devices config space to 0.

View file

@ -44,8 +44,6 @@ class Uart;
class Platform : public SimObject class Platform : public SimObject
{ {
protected:
typedef TheISA::Addr Addr;
public: public:
/** Pointer to the interrupt controller */ /** Pointer to the interrupt controller */
IntrControl *intrctrl; IntrControl *intrctrl;

View file

@ -44,8 +44,6 @@ class PhysicalMemory;
*/ */
class SimpleDisk : public SimObject class SimpleDisk : public SimObject
{ {
protected:
typedef TheISA::Addr Addr;
public: public:
typedef uint64_t baddr_t; typedef uint64_t baddr_t;

View file

@ -163,7 +163,7 @@ struct Info
/* namespace Regs */ } /* namespace Regs */ }
inline const Regs::Info& inline const Regs::Info&
regInfo(TheISA::Addr daddr) regInfo(Addr daddr)
{ {
static Regs::Info invalid = { 0, false, false, "invalid" }; static Regs::Info invalid = { 0, false, false, "invalid" };
static Regs::Info info [] = { static Regs::Info info [] = {
@ -199,7 +199,7 @@ regInfo(TheISA::Addr daddr)
} }
inline bool inline bool
regValid(TheISA::Addr daddr) regValid(Addr daddr)
{ {
if (daddr > Regs::Size) if (daddr > Regs::Size)
return false; return false;

View file

@ -55,8 +55,6 @@ class System;
class Tsunami : public Platform class Tsunami : public Platform
{ {
protected:
typedef TheISA::Addr Addr;
public: public:
/** Max number of CPUs in a Tsunami */ /** Max number of CPUs in a Tsunami */
static const int Max_CPUs = 64; static const int Max_CPUs = 64;

View file

@ -50,8 +50,6 @@ extern const char *modestr[];
class Binning class Binning
{ {
protected:
typedef TheISA::Addr Addr;
private: private:
std::string myname; std::string myname;
System *system; System *system;
@ -126,8 +124,6 @@ class Binning
class Statistics : public Serializable class Statistics : public Serializable
{ {
protected:
typedef TheISA::Addr Addr;
private: private:
friend class Binning; friend class Binning;

View file

@ -37,7 +37,7 @@
#if __GNUC__ == 3 && __GNUC_MINOR__ != 3 #if __GNUC__ == 3 && __GNUC_MINOR__ != 3
typedef uint64_t uint64_ta __attribute__ ((aligned (8))) ; typedef uint64_t uint64_ta __attribute__ ((aligned (8))) ;
typedef int64_t int64_ta __attribute__ ((aligned (8))) ; typedef int64_t int64_ta __attribute__ ((aligned (8))) ;
typedef TheISA::Addr Addr_a __attribute__ ((aligned (8))) ; typedef Addr Addr_a __attribute__ ((aligned (8))) ;
#else #else
#define uint64_ta uint64_t __attribute__ ((aligned (8))) #define uint64_ta uint64_t __attribute__ ((aligned (8)))
#define int64_ta int64_t __attribute__ ((aligned (8))) #define int64_ta int64_t __attribute__ ((aligned (8)))

View file

@ -53,9 +53,6 @@ class Linux {};
/// ///
class Linux { class Linux {
protected:
typedef TheISA::Addr Addr;
public: public:
//@{ //@{

View file

@ -37,8 +37,6 @@ namespace Linux {
class ThreadInfo class ThreadInfo
{ {
protected:
typedef TheISA::Addr Addr;
private: private:
ExecContext *xc; ExecContext *xc;

View file

@ -35,35 +35,35 @@
namespace tru64 { namespace tru64 {
struct m_hdr { struct m_hdr {
TheISA::Addr mh_next; // 0x00 Addr mh_next; // 0x00
TheISA::Addr mh_nextpkt; // 0x08 Addr mh_nextpkt; // 0x08
TheISA::Addr mh_data; // 0x10 Addr mh_data; // 0x10
int32_t mh_len; // 0x18 int32_t mh_len; // 0x18
int32_t mh_type; // 0x1C int32_t mh_type; // 0x1C
int32_t mh_flags; // 0x20 int32_t mh_flags; // 0x20
int32_t mh_pad0; // 0x24 int32_t mh_pad0; // 0x24
TheISA::Addr mh_foo[4]; // 0x28, 0x30, 0x38, 0x40 Addr mh_foo[4]; // 0x28, 0x30, 0x38, 0x40
}; };
struct pkthdr { struct pkthdr {
int32_t len; int32_t len;
int32_t protocolSum; int32_t protocolSum;
TheISA::Addr rcvif; Addr rcvif;
}; };
struct m_ext { struct m_ext {
TheISA::Addr ext_buf; // 0x00 Addr ext_buf; // 0x00
TheISA::Addr ext_free; // 0x08 Addr ext_free; // 0x08
uint32_t ext_size; // 0x10 uint32_t ext_size; // 0x10
uint32_t ext_pad0; // 0x14 uint32_t ext_pad0; // 0x14
TheISA::Addr ext_arg; // 0x18 Addr ext_arg; // 0x18
struct ext_refq { struct ext_refq {
TheISA::Addr forw, back; // 0x20, 0x28 Addr forw, back; // 0x20, 0x28
} ext_ref; } ext_ref;
TheISA::Addr uiomove_f; // 0x30 Addr uiomove_f; // 0x30
int32_t protocolSum; // 0x38 int32_t protocolSum; // 0x38
int32_t bytesSummed; // 0x3C int32_t bytesSummed; // 0x3C
TheISA::Addr checksum; // 0x40 Addr checksum; // 0x40
}; };
struct mbuf { struct mbuf {

View file

@ -392,7 +392,7 @@ class Tru64 {
/// For stack_create. /// For stack_create.
struct vm_stack { struct vm_stack {
// was void * // was void *
TheISA::Addr address; //!< address hint Addr address; //!< address hint
size_t rsize; //!< red zone size size_t rsize; //!< red zone size
size_t ysize; //!< yellow zone size size_t ysize; //!< yellow zone size
size_t gsize; //!< green zone size size_t gsize; //!< green zone size
@ -401,7 +401,7 @@ class Tru64 {
uint64_t align; //!< address alignment uint64_t align; //!< address alignment
uint64_t flags; //!< MAP_FIXED etc. uint64_t flags; //!< MAP_FIXED etc.
// was struct memalloc_attr * // was struct memalloc_attr *
TheISA::Addr attr; //!< allocation policy Addr attr; //!< allocation policy
uint64_t reserved; //!< reserved uint64_t reserved; //!< reserved
}; };
@ -433,7 +433,7 @@ class Tru64 {
sigset_t sigmask; //!< thread signal mask sigset_t sigmask; //!< thread signal mask
sigset_t sig; //!< thread pending mask sigset_t sig; //!< thread pending mask
// struct nxm_pth_state * // struct nxm_pth_state *
TheISA::Addr pth_id; //!< out-of-line state Addr pth_id; //!< out-of-line state
int flags; //!< shared flags int flags; //!< shared flags
#define US_SIGSTACK 0x1 // thread called sigaltstack #define US_SIGSTACK 0x1 // thread called sigaltstack
#define US_ONSTACK 0x2 // thread is running on altstack #define US_ONSTACK 0x2 // thread is running on altstack
@ -469,12 +469,12 @@ class Tru64 {
int nxm_set_quantum; //!< quantum reset value int nxm_set_quantum; //!< quantum reset value
int nxm_sysevent; //!< syscall state int nxm_sysevent; //!< syscall state
// struct nxm_upcall * // struct nxm_upcall *
TheISA::Addr nxm_uc_ret; //!< stack ptr of null thread Addr nxm_uc_ret; //!< stack ptr of null thread
// void * // void *
TheISA::Addr nxm_tid; //!< scheduler's thread id Addr nxm_tid; //!< scheduler's thread id
int64_t nxm_va; //!< page fault address int64_t nxm_va; //!< page fault address
// struct nxm_pth_state * // struct nxm_pth_state *
TheISA::Addr nxm_pthid; //!< id of null thread Addr nxm_pthid; //!< id of null thread
uint64_t nxm_bound_pcs_count; //!< bound PCS thread count uint64_t nxm_bound_pcs_count; //!< bound PCS thread count
int64_t pad[2]; //!< pad int64_t pad[2]; //!< pad
}; };
@ -502,9 +502,9 @@ class Tru64 {
int nxm_nslots_per_rad; //!< max number of VP slots per RAD int nxm_nslots_per_rad; //!< max number of VP slots per RAD
int nxm_nrads; //!< max number of RADs int nxm_nrads; //!< max number of RADs
// nxm_slot_state_t * // nxm_slot_state_t *
TheISA::Addr nxm_slot_state; //!< per-VP slot state Addr nxm_slot_state; //!< per-VP slot state
// struct nxm_shared * // struct nxm_shared *
TheISA::Addr nxm_rad[1]; //!< per-RAD shared areas Addr nxm_rad[1]; //!< per-RAD shared areas
}; };
/// For nxm_thread_create. /// For nxm_thread_create.
@ -523,7 +523,7 @@ class Tru64 {
int policy; //!< policy int policy; //!< policy
int signal_type; //!< signal_type int signal_type; //!< signal_type
// void * // void *
TheISA::Addr pthid; //!< pthid Addr pthid; //!< pthid
sigset_t sigmask; //!< sigmask sigset_t sigmask; //!< sigmask
/// Initial register values. /// Initial register values.
struct { struct {
@ -539,7 +539,7 @@ class Tru64 {
/// memory space. Used by stat(), fstat(), and lstat(). /// memory space. Used by stat(), fstat(), and lstat().
template <class T> template <class T>
static void static void
copyOutStatBuf(FunctionalMemory *mem, TheISA::Addr addr, global_stat *host) copyOutStatBuf(FunctionalMemory *mem, Addr addr, global_stat *host)
{ {
TypedBufferArg<T> tgt(addr); TypedBufferArg<T> tgt(addr);
@ -565,7 +565,7 @@ class Tru64 {
/// memory space. Used by statfs() and fstatfs(). /// memory space. Used by statfs() and fstatfs().
template <class T> template <class T>
static void static void
copyOutStatfsBuf(FunctionalMemory *mem, TheISA::Addr addr, global_statfs *host) copyOutStatfsBuf(FunctionalMemory *mem, Addr addr, global_statfs *host)
{ {
TypedBufferArg<T> tgt(addr); TypedBufferArg<T> tgt(addr);
@ -589,13 +589,13 @@ class Tru64 {
class F64 { class F64 {
public: public:
static void copyOutStatBuf(FunctionalMemory *mem, TheISA::Addr addr, static void copyOutStatBuf(FunctionalMemory *mem, Addr addr,
global_stat *host) global_stat *host)
{ {
Tru64::copyOutStatBuf<Tru64::F64_stat>(mem, addr, host); Tru64::copyOutStatBuf<Tru64::F64_stat>(mem, addr, host);
} }
static void copyOutStatfsBuf(FunctionalMemory *mem, TheISA::Addr addr, static void copyOutStatfsBuf(FunctionalMemory *mem, Addr addr,
global_statfs *host) global_statfs *host)
{ {
Tru64::copyOutStatfsBuf<Tru64::F64_statfs>(mem, addr, host); Tru64::copyOutStatfsBuf<Tru64::F64_statfs>(mem, addr, host);
@ -604,13 +604,13 @@ class Tru64 {
class PreF64 { class PreF64 {
public: public:
static void copyOutStatBuf(FunctionalMemory *mem, TheISA::Addr addr, static void copyOutStatBuf(FunctionalMemory *mem, Addr addr,
global_stat *host) global_stat *host)
{ {
Tru64::copyOutStatBuf<Tru64::pre_F64_stat>(mem, addr, host); Tru64::copyOutStatBuf<Tru64::pre_F64_stat>(mem, addr, host);
} }
static void copyOutStatfsBuf(FunctionalMemory *mem, TheISA::Addr addr, static void copyOutStatfsBuf(FunctionalMemory *mem, Addr addr,
global_statfs *host) global_statfs *host)
{ {
Tru64::copyOutStatfsBuf<Tru64::pre_F64_statfs>(mem, addr, host); Tru64::copyOutStatfsBuf<Tru64::pre_F64_statfs>(mem, addr, host);
@ -622,7 +622,7 @@ class Tru64 {
/// the simulated memory space. Used by pre_F64_stat(), /// the simulated memory space. Used by pre_F64_stat(),
/// pre_F64_fstat(), and pre_F64_lstat(). /// pre_F64_fstat(), and pre_F64_lstat().
static void static void
copyOutPreF64StatBuf(FunctionalMemory *mem, TheISA::Addr addr, struct stat *host) copyOutPreF64StatBuf(FunctionalMemory *mem, Addr addr, struct stat *host)
{ {
TypedBufferArg<Tru64::pre_F64_stat> tgt(addr); TypedBufferArg<Tru64::pre_F64_stat> tgt(addr);
@ -653,7 +653,6 @@ class Tru64 {
getdirentriesFunc(SyscallDesc *desc, int callnum, Process *process, getdirentriesFunc(SyscallDesc *desc, int callnum, Process *process,
ExecContext *xc) ExecContext *xc)
{ {
using TheISA::Addr;
#ifdef __CYGWIN__ #ifdef __CYGWIN__
panic("getdirent not implemented on cygwin!"); panic("getdirent not implemented on cygwin!");
#else #else
@ -809,7 +808,6 @@ class Tru64 {
nxm_task_initFunc(SyscallDesc *desc, int callnum, Process *process, nxm_task_initFunc(SyscallDesc *desc, int callnum, Process *process,
ExecContext *xc) ExecContext *xc)
{ {
using TheISA::Addr;
TypedBufferArg<Tru64::nxm_task_attr> attrp(xc->getSyscallArg(0)); TypedBufferArg<Tru64::nxm_task_attr> attrp(xc->getSyscallArg(0));
TypedBufferArg<Addr> configptr_ptr(xc->getSyscallArg(1)); TypedBufferArg<Addr> configptr_ptr(xc->getSyscallArg(1));
@ -939,7 +937,6 @@ class Tru64 {
nxm_thread_createFunc(SyscallDesc *desc, int callnum, Process *process, nxm_thread_createFunc(SyscallDesc *desc, int callnum, Process *process,
ExecContext *xc) ExecContext *xc)
{ {
using TheISA::Addr;
TypedBufferArg<Tru64::nxm_thread_attr> attrp(xc->getSyscallArg(0)); TypedBufferArg<Tru64::nxm_thread_attr> attrp(xc->getSyscallArg(0));
TypedBufferArg<uint64_t> kidp(xc->getSyscallArg(1)); TypedBufferArg<uint64_t> kidp(xc->getSyscallArg(1));
int thread_index = xc->getSyscallArg(2); int thread_index = xc->getSyscallArg(2);
@ -1079,7 +1076,6 @@ class Tru64 {
nxm_blockFunc(SyscallDesc *desc, int callnum, Process *process, nxm_blockFunc(SyscallDesc *desc, int callnum, Process *process,
ExecContext *xc) ExecContext *xc)
{ {
using TheISA::Addr;
Addr uaddr = xc->getSyscallArg(0); Addr uaddr = xc->getSyscallArg(0);
uint64_t val = xc->getSyscallArg(1); uint64_t val = xc->getSyscallArg(1);
uint64_t secs = xc->getSyscallArg(2); uint64_t secs = xc->getSyscallArg(2);
@ -1101,7 +1097,6 @@ class Tru64 {
nxm_unblockFunc(SyscallDesc *desc, int callnum, Process *process, nxm_unblockFunc(SyscallDesc *desc, int callnum, Process *process,
ExecContext *xc) ExecContext *xc)
{ {
using TheISA::Addr;
Addr uaddr = xc->getSyscallArg(0); Addr uaddr = xc->getSyscallArg(0);
cout << xc->cpu->name() << ": nxm_unblock " cout << xc->cpu->name() << ": nxm_unblock "
@ -1129,7 +1124,7 @@ class Tru64 {
/// Activate exec context waiting on a channel. Just activate one /// Activate exec context waiting on a channel. Just activate one
/// by default. /// by default.
static int static int
activate_waiting_context(TheISA::Addr uaddr, Process *process, activate_waiting_context(Addr uaddr, Process *process,
bool activate_all = false) bool activate_all = false)
{ {
int num_activated = 0; int num_activated = 0;
@ -1158,7 +1153,7 @@ class Tru64 {
/// M5 hacked-up lock acquire. /// M5 hacked-up lock acquire.
static void static void
m5_lock_mutex(TheISA::Addr uaddr, Process *process, ExecContext *xc) m5_lock_mutex(Addr uaddr, Process *process, ExecContext *xc)
{ {
TypedBufferArg<uint64_t> lockp(uaddr); TypedBufferArg<uint64_t> lockp(uaddr);
@ -1177,7 +1172,7 @@ class Tru64 {
/// M5 unlock call. /// M5 unlock call.
static void static void
m5_unlock_mutex(TheISA::Addr uaddr, Process *process, ExecContext *xc) m5_unlock_mutex(Addr uaddr, Process *process, ExecContext *xc)
{ {
TypedBufferArg<uint64_t> lockp(uaddr); TypedBufferArg<uint64_t> lockp(uaddr);
@ -1199,7 +1194,6 @@ class Tru64 {
m5_mutex_lockFunc(SyscallDesc *desc, int callnum, Process *process, m5_mutex_lockFunc(SyscallDesc *desc, int callnum, Process *process,
ExecContext *xc) ExecContext *xc)
{ {
using TheISA::Addr;
Addr uaddr = xc->getSyscallArg(0); Addr uaddr = xc->getSyscallArg(0);
m5_lock_mutex(uaddr, process, xc); m5_lock_mutex(uaddr, process, xc);
@ -1215,7 +1209,6 @@ class Tru64 {
m5_mutex_trylockFunc(SyscallDesc *desc, int callnum, Process *process, m5_mutex_trylockFunc(SyscallDesc *desc, int callnum, Process *process,
ExecContext *xc) ExecContext *xc)
{ {
using TheISA::Addr;
Addr uaddr = xc->getSyscallArg(0); Addr uaddr = xc->getSyscallArg(0);
TypedBufferArg<uint64_t> lockp(uaddr); TypedBufferArg<uint64_t> lockp(uaddr);
@ -1236,7 +1229,6 @@ class Tru64 {
m5_mutex_unlockFunc(SyscallDesc *desc, int callnum, Process *process, m5_mutex_unlockFunc(SyscallDesc *desc, int callnum, Process *process,
ExecContext *xc) ExecContext *xc)
{ {
using TheISA::Addr;
Addr uaddr = xc->getSyscallArg(0); Addr uaddr = xc->getSyscallArg(0);
m5_unlock_mutex(uaddr, process, xc); m5_unlock_mutex(uaddr, process, xc);
@ -1249,7 +1241,6 @@ class Tru64 {
m5_cond_signalFunc(SyscallDesc *desc, int callnum, Process *process, m5_cond_signalFunc(SyscallDesc *desc, int callnum, Process *process,
ExecContext *xc) ExecContext *xc)
{ {
using TheISA::Addr;
Addr cond_addr = xc->getSyscallArg(0); Addr cond_addr = xc->getSyscallArg(0);
// Wake up one process waiting on the condition variable. // Wake up one process waiting on the condition variable.
@ -1263,7 +1254,6 @@ class Tru64 {
m5_cond_broadcastFunc(SyscallDesc *desc, int callnum, Process *process, m5_cond_broadcastFunc(SyscallDesc *desc, int callnum, Process *process,
ExecContext *xc) ExecContext *xc)
{ {
using TheISA::Addr;
Addr cond_addr = xc->getSyscallArg(0); Addr cond_addr = xc->getSyscallArg(0);
activate_waiting_context(cond_addr, process, true); activate_waiting_context(cond_addr, process, true);
@ -1276,7 +1266,6 @@ class Tru64 {
m5_cond_waitFunc(SyscallDesc *desc, int callnum, Process *process, m5_cond_waitFunc(SyscallDesc *desc, int callnum, Process *process,
ExecContext *xc) ExecContext *xc)
{ {
using TheISA::Addr;
Addr cond_addr = xc->getSyscallArg(0); Addr cond_addr = xc->getSyscallArg(0);
Addr lock_addr = xc->getSyscallArg(1); Addr lock_addr = xc->getSyscallArg(1);
TypedBufferArg<uint64_t> condp(cond_addr); TypedBufferArg<uint64_t> condp(cond_addr);

View file

@ -54,4 +54,12 @@ typedef int64_t Counter;
*/ */
typedef int64_t Tick; typedef int64_t Tick;
/**
* Address type
* This will probably be moved somewhere else in the near future.
* This should be at least as big as the biggest address width in use
* in the system, which will probably be 64 bits.
*/
typedef uint64_t Addr;
#endif // __HOST_H__ #endif // __HOST_H__

View file

@ -52,7 +52,6 @@ class SyscallDesc;
class Process : public SimObject class Process : public SimObject
{ {
protected: protected:
typedef TheISA::Addr Addr;
typedef TheISA::RegFile RegFile; typedef TheISA::RegFile RegFile;
typedef TheISA::MachInst MachInst; typedef TheISA::MachInst MachInst;
public: public:

View file

@ -52,8 +52,8 @@ namespace AlphaPseudo
void dumpstats(ExecContext *xc, Tick delay, Tick period); void dumpstats(ExecContext *xc, Tick delay, Tick period);
void dumpresetstats(ExecContext *xc, Tick delay, Tick period); void dumpresetstats(ExecContext *xc, Tick delay, Tick period);
void m5checkpoint(ExecContext *xc, Tick delay, Tick period); void m5checkpoint(ExecContext *xc, Tick delay, Tick period);
uint64_t readfile(ExecContext *xc, TheISA::Addr vaddr, uint64_t len, uint64_t offset); uint64_t readfile(ExecContext *xc, Addr vaddr, uint64_t len, uint64_t offset);
void debugbreak(ExecContext *xc); void debugbreak(ExecContext *xc);
void switchcpu(ExecContext *xc); void switchcpu(ExecContext *xc);
void addsymbol(ExecContext *xc, TheISA::Addr addr, TheISA::Addr symbolAddr); void addsymbol(ExecContext *xc, Addr addr, Addr symbolAddr);
} }

View file

@ -90,9 +90,6 @@ class SyscallDesc {
class BaseBufferArg { class BaseBufferArg {
protected:
typedef TheISA::Addr Addr;
public: public:
BaseBufferArg(Addr _addr, int _size) : addr(_addr), size(_size) BaseBufferArg(Addr _addr, int _size) : addr(_addr), size(_size)
@ -643,7 +640,7 @@ template <class OS>
SyscallReturn SyscallReturn
mmapFunc(SyscallDesc *desc, int num, Process *p, ExecContext *xc) mmapFunc(SyscallDesc *desc, int num, Process *p, ExecContext *xc)
{ {
TheISA::Addr start = xc->getSyscallArg(0); Addr start = xc->getSyscallArg(0);
uint64_t length = xc->getSyscallArg(1); uint64_t length = xc->getSyscallArg(1);
// int prot = xc->getSyscallArg(2); // int prot = xc->getSyscallArg(2);
int flags = xc->getSyscallArg(3); int flags = xc->getSyscallArg(3);

View file

@ -50,8 +50,6 @@ namespace Kernel { class Binning; }
class System : public SimObject class System : public SimObject
{ {
protected:
typedef TheISA::Addr Addr;
public: public:
MemoryController *memctrl; MemoryController *memctrl;
PhysicalMemory *physmem; PhysicalMemory *physmem;

View file

@ -37,8 +37,6 @@ class ExecContext;
template <class T> template <class T>
class VPtr class VPtr
{ {
protected:
typedef TheISA::Addr Addr;
public: public:
typedef T Type; typedef T Type;