diff options
author | Kevin Lim <ktlim@umich.edu> | 2006-03-07 19:59:12 -0500 |
---|---|---|
committer | Kevin Lim <ktlim@umich.edu> | 2006-03-07 19:59:12 -0500 |
commit | 11aead894d4186916b587b1449075f276319a235 (patch) | |
tree | 23929a154420227f082432d2738b190685ab53ed /arch | |
parent | 20eced3ea07f64e50444c00125012d6641416e4b (diff) | |
download | gem5-11aead894d4186916b587b1449075f276319a235.tar.xz |
Updates for the quiesceEvent that was added to the XC.
Also several files need to include system.hh or symtab.hh. This is because exec_context.hh has less #includes than before, requiring some of the files that include it to include some other files as well.
arch/alpha/faults.cc:
Avoid accessing XC directly.
arch/alpha/stacktrace.cc:
StackTrace needs to include system.hh.
cpu/cpu_exec_context.cc:
Update for change to CPUExecContext.
cpu/cpu_exec_context.hh:
Make quiesce events use CPUExecContext instead of ExecContext. Include functions to allow the quiesce event and last activate/suspend be accessed.
cpu/exec_context.hh:
Include functions for quiesceEvent.
cpu/intr_control.cc:
Needs to include cpu/exec_context.hh.
cpu/profile.cc:
Needs to include symtab.hh for the symbol table.
cpu/profile.hh:
Needs forward declare of ExecContext.
cpu/simple/cpu.cc:
Rename xc to cpuXC.
dev/tsunami_cchip.cc:
Needs to include exec_context.hh.
kern/kernel_stats.cc:
Needs to include system.hh.
kern/linux/events.cc:
Needs to include system.hh.
Also avoid accessing objects directly from the XC.
kern/tru64/dump_mbuf.cc:
Include symtab.hh for the SymbolTable and system.hh.
kern/tru64/tru64_events.cc:
Include system.hh
sim/pseudo_inst.cc:
Avoid accessing objects directly within the XC.
--HG--
extra : convert_revision : 78fe30d98cd20f7403fa216f772071458b675c84
Diffstat (limited to 'arch')
-rw-r--r-- | arch/alpha/faults.cc | 18 | ||||
-rw-r--r-- | arch/alpha/stacktrace.cc | 1 |
2 files changed, 10 insertions, 9 deletions
diff --git a/arch/alpha/faults.cc b/arch/alpha/faults.cc index 84f785c0a..2d16317ec 100644 --- a/arch/alpha/faults.cc +++ b/arch/alpha/faults.cc @@ -103,15 +103,15 @@ FaultStat IntegerOverflowFault::_stat; void AlphaFault::invoke(ExecContext * xc) { - DPRINTF(Fault, "Fault %s at PC: %#x\n", name(), xc->regs.pc); - xc->cpu->recordEvent(csprintf("Fault %s", name())); + DPRINTF(Fault, "Fault %s at PC: %#x\n", name(), xc->readPC()); + xc->getCpuPtr()->recordEvent(csprintf("Fault %s", name())); assert(!xc->misspeculating()); - xc->kernelStats->fault(this); + xc->getCpuPtr()->kernelStats->fault(this); // exception restart address if (setRestartAddress() || !xc->inPalMode()) - xc->setMiscReg(AlphaISA::IPR_EXC_ADDR, xc->regs.pc); + xc->setMiscReg(AlphaISA::IPR_EXC_ADDR, xc->readPC()); if (skipFaultingInstruction()) { // traps... skip faulting instruction. @@ -119,17 +119,17 @@ void AlphaFault::invoke(ExecContext * xc) xc->readMiscReg(AlphaISA::IPR_EXC_ADDR) + 4); } - xc->regs.pc = xc->readMiscReg(AlphaISA::IPR_PAL_BASE) + vect(); - xc->regs.npc = xc->regs.pc + sizeof(MachInst); + xc->setPC(xc->readMiscReg(AlphaISA::IPR_PAL_BASE) + vect()); + xc->setNextPC(xc->readPC() + sizeof(MachInst)); } void ArithmeticFault::invoke(ExecContext * xc) { - DPRINTF(Fault, "Fault %s at PC: %#x\n", name(), xc->regs.pc); - xc->cpu->recordEvent(csprintf("Fault %s", name())); + DPRINTF(Fault, "Fault %s at PC: %#x\n", name(), xc->readPC()); + xc->getCpuPtr()->recordEvent(csprintf("Fault %s", name())); assert(!xc->misspeculating()); - xc->kernelStats->fault(this); + xc->getCpuPtr()->kernelStats->fault(this); panic("Arithmetic traps are unimplemented!"); } diff --git a/arch/alpha/stacktrace.cc b/arch/alpha/stacktrace.cc index 50f2e4d21..26656ab5c 100644 --- a/arch/alpha/stacktrace.cc +++ b/arch/alpha/stacktrace.cc @@ -35,6 +35,7 @@ #include "base/trace.hh" #include "cpu/base.hh" #include "cpu/exec_context.hh" +#include "sim/system.hh" using namespace std; using namespace AlphaISA; |