Patent ID: 7263603
Filing Date: 2007-08-28
Classification: G06F

Abstract:
1. A method for avoiding read-after-write (RAW) hazards while speculatively executing instructions on a processor, comprising: issuing instructions for execution during a normal execution mode; upon encountering a stall condition during execution of an instruction, generating a checkpoint, and executing the instruction and subsequent instructions in a speculative-execution mode, wherein the stall condition is a data-dependent stall condition, and wherein the speculative-execution mode is an execute-ahead mode, wherein instructions that cannot be executed because of an unresolved data dependency are deferred, and wherein other non-deferred instructions are executed in program order; maintaining dependency information for each register indicating whether or not a value in the register depends on an unresolved data-dependency; and using the dependency information to avoid RAW hazards during the speculative-execution mode; wherein if the data-dependent stall condition is resolved during execute-ahead mode, the method further comprises executing deferred instructions in a deferred execution mode by: issuing deferred instructions for execution in program order; deferring execution of deferred instructions that still cannot be executed because of unresolved data dependencies; executing other deferred instructions that are able to be executed in program order: and if all deferred instructions are executed, returning to the normal execution mode to resume normal program execution from the point where the execute-ahead mode left off.