/** * Calls a callback function for all sourced register channels. * * This is conservative, i.e. channels may be called multiple times, * and the writemask of the instruction is not taken into account. */ void rc_for_all_reads(struct rc_instruction * inst, rc_read_write_fn cb, void * userdata) { if (inst->Type == RC_INSTRUCTION_NORMAL) { reads_normal(inst, cb, userdata); } else { reads_pair(inst, cb, userdata); } }
/** * Calls a callback function for all register reads. * * This is conservative, i.e. if the same register is referenced multiple times, * the callback may also be called multiple times. * Also, the writemask of the instruction is not taken into account. */ void rc_for_all_reads_mask(struct rc_instruction * inst, rc_read_write_mask_fn cb, void * userdata) { if (inst->Type == RC_INSTRUCTION_NORMAL) { struct read_write_mask_data cb_data; cb_data.UserData = userdata; cb_data.Cb = cb; rc_for_all_reads_src(inst, reads_normal_callback, &cb_data); } else { reads_pair(inst, cb, userdata); } }