using namespace std;
using namespace EV5;
-namespace AlphaISA
-{
+namespace AlphaISA {
///////////////////////////////////////////////////////////////////////
//
// Alpha TLB
#if ALPHA_TLASER
- if (req->getPaddr() & PAddrUncachedBit39) {
+ if (req->getPaddr() & PAddrUncachedBit39)
#else
- if (req->getPaddr() & PAddrUncachedBit43) {
+ if (req->getPaddr() & PAddrUncachedBit43)
#endif
+ {
// IPR memory space not implemented
if (PAddrIprSpace(req->getPaddr())) {
return new UnimpFault("IPR memory space not implemented!");
// VA<47:41> == 0x7e, VA<40:13> maps directly to PA<40:13> for EV6
#if ALPHA_TLASER
if ((MCSR_SP(tc->readMiscReg(IPR_MCSR)) & 2) &&
- VAddrSpaceEV5(req->getVaddr()) == 2) {
+ VAddrSpaceEV5(req->getVaddr()) == 2)
#else
- if (VAddrSpaceEV6(req->getVaddr()) == 0x7e) {
+ if (VAddrSpaceEV6(req->getVaddr()) == 0x7e)
#endif
+ {
// only valid in kernel mode
if (ICM_CM(tc->readMiscReg(IPR_ICM)) !=
mode_kernel) {
// Check for "superpage" mapping
#if ALPHA_TLASER
if ((MCSR_SP(tc->readMiscReg(IPR_MCSR)) & 2) &&
- VAddrSpaceEV5(req->getVaddr()) == 2) {
+ VAddrSpaceEV5(req->getVaddr()) == 2)
#else
- if (VAddrSpaceEV6(req->getVaddr()) == 0x7e) {
+ if (VAddrSpaceEV6(req->getVaddr()) == 0x7e)
#endif
+ {
// only valid in kernel mode
if (DTB_CM_CM(tc->readMiscReg(IPR_DTB_CM)) !=
return *pte;
}
+/* end namespace AlphaISA */ }
+
DEFINE_SIM_OBJECT_CLASS_NAME("AlphaTLB", TLB)
BEGIN_DECLARE_SIM_OBJECT_PARAMS(ITB)
}
REGISTER_SIM_OBJECT("AlphaDTB", DTB)
-}
/* @todo remove some of the magic constants. -- ali
* */
-namespace SparcISA
-{
+namespace SparcISA {
TLB::TLB(const std::string &name, int s)
: SimObject(name), size(s), usedEntries(0), lastReplaced(0),
}
}
+/* end namespace SparcISA */ }
+
+using namespace SparcISA;
DEFINE_SIM_OBJECT_CLASS_NAME("SparcTLB", TLB)
}
REGISTER_SIM_OBJECT("SparcDTB", DTB)
-}