Rules to Remember
Branches must be resolved in Program Order
Stores cannot be dispatched while under speculative execution
- No way to recover memory consistency if misprediction made.
Only NON-speculative instructions can be retired
The spec_flag which follows an instruction throughout its life within the CPU is KEY for correct operation
- If instruction’s context value ever equal to firstctx, then spec_flag is set to FALSE.
- A speculative instruction can become non-speculative, but not vice-versa.