Context Pointers
If supporting SPECMAX number of speculative branches, then we need SPECMAX + 1 contexts (the extra context is the state information for when we are not under speculative execution).
Need to use two pointers for accessing contexts:
- firstctx -- this always points to the ‘oldest’ context; it is also the context that is not speculative!
- lastctx -- this always points to the ‘newest’ context; all contexts firstctx+1 up to lastcxt are speculative!
firstctx, lastctx are actually tail, head pointers to a circular buffer of contexts.