From 3886c4a8f2e1bfe17cbf7a5a76ba0fc978c6bb48 Mon Sep 17 00:00:00 2001 From: Brandon Potter Date: Wed, 9 Nov 2016 14:27:40 -0600 Subject: syscall_emul: [patch 5/22] remove LiveProcess class and use Process instead The EIOProcess class was removed recently and it was the only other class which derived from Process. Since every Process invocation is also a LiveProcess invocation, it makes sense to simplify the organization by combining the fields from LiveProcess into Process. --- src/arch/sparc/faults.cc | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'src/arch/sparc/faults.cc') diff --git a/src/arch/sparc/faults.cc b/src/arch/sparc/faults.cc index e2ff87726..6c3b35c9a 100644 --- a/src/arch/sparc/faults.cc +++ b/src/arch/sparc/faults.cc @@ -768,12 +768,11 @@ SpillNNormal::invoke(ThreadContext *tc, const StaticInstPtr &inst) Process *p = tc->getProcessPtr(); - //XXX This will only work in faults from a SparcLiveProcess - SparcLiveProcess *lp = dynamic_cast(p); - assert(lp); + SparcProcess *sp = dynamic_cast(p); + assert(sp); // Then adjust the PC and NPC - tc->pcState(lp->readSpillStart()); + tc->pcState(sp->readSpillStart()); } void @@ -788,12 +787,11 @@ FillNNormal::invoke(ThreadContext *tc, const StaticInstPtr &inst) Process *p = tc->getProcessPtr(); - //XXX This will only work in faults from a SparcLiveProcess - SparcLiveProcess *lp = dynamic_cast(p); - assert(lp); + SparcProcess *sp = dynamic_cast(p); + assert(sp); // Then adjust the PC and NPC - tc->pcState(lp->readFillStart()); + tc->pcState(sp->readFillStart()); } void @@ -810,10 +808,10 @@ TrapInstruction::invoke(ThreadContext *tc, const StaticInstPtr &inst) Process *p = tc->getProcessPtr(); - SparcLiveProcess *lp = dynamic_cast(p); - assert(lp); + SparcProcess *sp = dynamic_cast(p); + assert(sp); - lp->handleTrap(_n, tc); + sp->handleTrap(_n, tc); // We need to explicitly advance the pc, since that's not done for us // on a faulting instruction -- cgit v1.2.3