One embodiment of the present invention provides a system that supports
different modes of multi-threaded speculative execution on a processor.
The system starts with two or more threads executing in a first
multi-threaded speculative-execution mode. The system then switches to a
second multi-threaded speculative-execution mode by configuring circuits
in the processor to enable a second multi-threaded speculative-execution
mode. After configuring the circuits, the system next switches the
threads from executing in the first multi-threaded speculative-execution
mode to executing in the second multi-threaded speculative-execution
mode.