Previous - Up - Next

SIM_instruction_squash()

NAME
SIM_instruction_squash — rollback instructions

SYNOPSIS
instruction_error_t 
SIM_instruction_squash(instruction_id_t ii);

DESCRIPTION
This function is used to rollback the action taken by an instruction and its children. This is needed for example when speculation has gone wrong and the state of the CPU must be reset to a point that is consistent with program order. This function will also call SIM_instruction_end for every instruction squashed to deallocate the data structures for the instruction.

If the hap Instruction_Squashed has been installed the associated callback will be called for each instruction before it is deallocated. This is useful for example if user data has been added to the instruction.

EXCEPTIONS
Index Thrown if ii is illegal.
RETURN VALUE
Returns Sim_IE_OK on success, Sim_IE_Not_Inserted if the instruction is not inserted in the tree, Sim_IE_Sync_Instruction if there is a synchronous instruction in the tree that cannot be squashed, or Sim_IE_Retired_Instruction if there is a retired instruction in the tree.
SEE ALSO
SIM_instruction_rewind

Previous - Up - Next