Previous - Up - Next

SIM_instruction_rewind()

NAME
SIM_instruction_rewind — rewind phase of instructions

SYNOPSIS
instruction_error_t 
SIM_instruction_rewind(instruction_id_t ii, instruction_phase_t phase);

DESCRIPTION
This function is used to undo the action taken by one or more phases of an instruction. Contrary to SIM_instruction_squash, the instruction is not removed from the tree and deallocated. This can by useful if for example speculative data was used during a phase and it has been proved wrong later. It is then possible to rewind that phase and try again.

phase is the phase to rewind instruction ii to.

Currently the only phase that can be rewinded is the execution phase.

It is not possible to rewind a stalling instruction. The stalling must be finished before the instruction can be rewinded.

EXCEPTIONS
Index Thrown if ii is illegal.
RETURN VALUE
Returns Sim_IE_OK on success, Sim_IE_Illegal_Rewind_Phase if this phase cannot be rewinded, or Sim_IE_Stalling if the instruction is stalling.

Previous - Up - Next