A speculative execution capability of a processor is exposed to program
control through at least one machine instruction. The at least one
machine instruction may be two instructions designed to facilitate
synchronization between parallel processes. According to an aspect, an
instruction set architecture includes circuitry that handles a
speculative execution instruction and a speculation termination
instruction. The speculative execution instruction may be an instruction
that takes first and second operands, causes the processor to
speculatively execute additional instructions if a memory location
contains a value, and causes the processor to start executing
instructions from an address indicated by the second operand if a
mis-speculation occurs, and the speculation termination instruction may
be an instruction that causes the processor to begin retiring the
additional instructions.