From 1268e0df1f3d16d804b31005acf8067415771518 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Tue, 1 Nov 2011 04:01:13 -0700 Subject: SE/FS: Expose the same methods on the CPUs in SE and FS modes. --- src/cpu/inorder/cpu.cc | 2 -- src/cpu/inorder/cpu.hh | 2 -- src/cpu/inorder/inorder_dyn_inst.cc | 16 +++++++--------- src/cpu/inorder/inorder_dyn_inst.hh | 3 --- 4 files changed, 7 insertions(+), 16 deletions(-) (limited to 'src/cpu/inorder') diff --git a/src/cpu/inorder/cpu.cc b/src/cpu/inorder/cpu.cc index 97fbe737e..226b2d8ea 100644 --- a/src/cpu/inorder/cpu.cc +++ b/src/cpu/inorder/cpu.cc @@ -1688,7 +1688,6 @@ InOrderCPU::wakeCPU() schedule(&tickEvent, nextCycle(curTick())); } -#if FULL_SYSTEM // Lots of copied full system code...place into BaseCPU class? void InOrderCPU::wakeup() @@ -1701,7 +1700,6 @@ InOrderCPU::wakeup() DPRINTF(Quiesce, "Suspended Processor woken\n"); threadContexts[0]->activate(); } -#endif void InOrderCPU::syscallContext(Fault fault, ThreadID tid, DynInstPtr inst, int delay) diff --git a/src/cpu/inorder/cpu.hh b/src/cpu/inorder/cpu.hh index dd53f3ce5..8e915c08c 100644 --- a/src/cpu/inorder/cpu.hh +++ b/src/cpu/inorder/cpu.hh @@ -751,9 +751,7 @@ class InOrderCPU : public BaseCPU /** Wakes the CPU, rescheduling the CPU if it's not already active. */ void wakeCPU(); -#if FULL_SYSTEM virtual void wakeup(); -#endif /* LL/SC debug functionality unsigned stCondFails; diff --git a/src/cpu/inorder/inorder_dyn_inst.cc b/src/cpu/inorder/inorder_dyn_inst.cc index ff178f6d3..043b21134 100644 --- a/src/cpu/inorder/inorder_dyn_inst.cc +++ b/src/cpu/inorder/inorder_dyn_inst.cc @@ -45,6 +45,7 @@ #include "cpu/exetrace.hh" #include "debug/InOrderDynInst.hh" #include "mem/request.hh" +#include "sim/full_system.hh" using namespace std; using namespace TheISA; @@ -269,8 +270,6 @@ InOrderDynInst::memAccess() } -#if FULL_SYSTEM - Fault InOrderDynInst::hwrei() { @@ -311,17 +310,16 @@ InOrderDynInst::simPalCheck(int palFunc) #endif return this->cpu->simPalCheck(palFunc, this->threadNumber); } -#endif void InOrderDynInst::syscall(int64_t callnum) { -#if FULL_SYSTEM - panic("Syscall emulation isn't available in FS mode.\n"); -#else - syscallNum = callnum; - cpu->syscallContext(NoFault, this->threadNumber, this); -#endif + if (FullSystem) { + panic("Syscall emulation isn't available in FS mode.\n"); + } else { + syscallNum = callnum; + cpu->syscallContext(NoFault, this->threadNumber, this); + } } void diff --git a/src/cpu/inorder/inorder_dyn_inst.hh b/src/cpu/inorder/inorder_dyn_inst.hh index f49476ec5..4dd5f3fda 100644 --- a/src/cpu/inorder/inorder_dyn_inst.hh +++ b/src/cpu/inorder/inorder_dyn_inst.hh @@ -517,15 +517,12 @@ class InOrderDynInst : public FastAlloc, public RefCounted void setCurResSlot(unsigned slot_num) { curResSlot = slot_num; } /** Calls a syscall. */ -#if FULL_SYSTEM /** Calls hardware return from error interrupt. */ Fault hwrei(); /** Traps to handle specified fault. */ void trap(Fault fault); bool simPalCheck(int palFunc); -#else short syscallNum; -#endif /** Emulates a syscall. */ void syscall(int64_t callnum); -- cgit v1.2.3