From 96375409ea7a5593ddd7f4f723db349921f35142 Mon Sep 17 00:00:00 2001 From: Min Kyu Jeong Date: Tue, 18 Jan 2011 16:30:01 -0600 Subject: O3: Fixes fetch deadlock when the interrupt clears before CPU handles it. When this condition occurs the cpu should restart the fetch stage to fetch from the original execution path. Fault handling in the commit stage is cleaned up a little bit so the control flow is simplier. Finally, if an instruction is being used to carry a fault it isn't executed, so the fault propagates appropriately. --- src/cpu/o3/iew_impl.hh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/cpu/o3/iew_impl.hh') diff --git a/src/cpu/o3/iew_impl.hh b/src/cpu/o3/iew_impl.hh index c809b93ab..2acb941e0 100644 --- a/src/cpu/o3/iew_impl.hh +++ b/src/cpu/o3/iew_impl.hh @@ -1255,7 +1255,13 @@ DefaultIEW::executeInsts() } } else { - inst->execute(); + // If the instruction has already faulted, then skip executing it. + // Such case can happen when it faulted during ITLB translation. + // If we execute the instruction (even if it's a nop) the fault + // will be replaced and we will lose it. + if (inst->getFault() == NoFault) { + inst->execute(); + } inst->setExecuted(); -- cgit v1.2.3