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/fetch.hh | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/cpu/o3/fetch.hh') diff --git a/src/cpu/o3/fetch.hh b/src/cpu/o3/fetch.hh index 87dde1da8..b86ccf81e 100644 --- a/src/cpu/o3/fetch.hh +++ b/src/cpu/o3/fetch.hh @@ -244,6 +244,15 @@ class DefaultFetch */ bool fetchCacheLine(Addr vaddr, Fault &ret_fault, ThreadID tid, Addr pc); + + /** Check if an interrupt is pending and that we need to handle + */ + bool + checkInterrupt(Addr pc) + { + return (interruptPending && (THE_ISA != ALPHA_ISA || !(pc & 0x3))); + } + /** Squashes a specific thread and resets the PC. */ inline void doSquash(const TheISA::PCState &newPC, ThreadID tid); -- cgit v1.2.3