Previous - Up - Next

SIM_instruction_get_user_data()

NAME
SIM_instruction_get_user_data, SIM_instruction_set_user_data — get/set instruction user data

SYNOPSIS
lang_void *
SIM_instruction_get_user_data(instruction_id_t ii);
void
SIM_instruction_set_user_data(instruction_id_t ii, 
                              lang_void *data);

DESCRIPTION
These two functions are used to set and get user defined data for instruction identified by ii. This is a convenient way to add extra information to an instruction. Note that this information needs to be deallocated by the user before SIM_instruction_end is called.

If an instruction is squashed the Instruction_Squashed hap should be used to handle the deallocation of user data.

EXCEPTIONS
Index Thrown if ii is illegal.
RETURN VALUE
SIM_instruction_get_user_data returns the user data.

Previous - Up - Next