From: Korey Sewell Date: Mon, 20 Jun 2011 01:43:42 +0000 (-0400) Subject: inorder: se: squash after syscalls X-Git-Tag: stable_2012_02_02~207 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b963b339b9d0f5a4583e62f32766f085ad95529e;p=gem5.git inorder: se: squash after syscalls --- diff --git a/src/cpu/inorder/cpu.cc b/src/cpu/inorder/cpu.cc index fbd4a6068..d8552d9d3 100644 --- a/src/cpu/inorder/cpu.cc +++ b/src/cpu/inorder/cpu.cc @@ -1713,7 +1713,16 @@ InOrderCPU::wakeup() void InOrderCPU::syscallContext(Fault fault, ThreadID tid, DynInstPtr inst, int delay) { - //@todo: squash behind syscall + // Syscall must be non-speculative, so squash from last stage + unsigned squash_stage = NumStages - 1; + inst->setSquashInfo(squash_stage); + + // Squash In Pipeline Stage + pipelineStage[squash_stage]->setupSquash(inst, tid); + + // Schedule Squash Through-out Resource Pool + resPool->scheduleEvent( + (InOrderCPU::CPUEventType)ResourcePool::SquashAll, inst, 0); scheduleCpuEvent(Syscall, fault, tid, inst, delay, Syscall_Pri); } diff --git a/src/cpu/inorder/inorder_dyn_inst.hh b/src/cpu/inorder/inorder_dyn_inst.hh index b655de380..c2d37d716 100644 --- a/src/cpu/inorder/inorder_dyn_inst.hh +++ b/src/cpu/inorder/inorder_dyn_inst.hh @@ -867,7 +867,7 @@ class InOrderDynInst : public FastAlloc, public RefCounted void setFloatSrc(int idx, FloatReg val); void setFloatRegBitsSrc(int idx, TheISA::FloatRegBits val); - uint64_t* getIntSrcPtr(int idx) { return &instSrc[idx].intVal; } + TheISA::IntReg* getIntSrcPtr(int idx) { return &instSrc[idx].intVal; } uint64_t readIntSrc(int idx) { return instSrc[idx].intVal; } /** These Instructions read a integer/float/misc. source register