Skip to main content

instr_reads_from_exact_reg

Function instr_reads_from_exact_reg 

Source
pub unsafe extern "C" fn instr_reads_from_exact_reg(
    instr: *mut instr_t,
    reg: reg_id_t,
    flags: dr_opnd_query_flags_t,
) -> bool_
Expand description

Assumes that \p reg is a DR_REG_ constant. Returns true iff at least one of \p instr’s source operands is the same register (not enough to just overlap) as \p reg.

For example, false is returned if the instruction \p instr is vmov [m], zmm0 and the register being tested \p reg is \p DR_REG_XMM0.

Registers used in memory operands, namely base, index and segmentation registers, are checked also by this routine. This also includes destination operands.

Which operands are considered to be accessed for conditionally executed instructions are controlled by \p flags.