NVlabs / NVBit

198 stars 18 forks source link

[feature request] Query for more detailed operand behavior from an Instr #84

Open bsarden opened 2 years ago

bsarden commented 2 years ago

It would be nice if NVBit had the ability to query for something similar to Intel PIN's INS_RegRContain and INS_RegWContain from the Instr object. Currently, it is possible to iterate over the operands in an instruction and determine their OperandType.

enum class OperandType {
    IMM_UINT64,
    IMM_DOUBLE,
    REG,
    PRED,
    UREG,
    UPRED,
    CBANK,
    MREF,
    GENERIC
};

However, I don't think it is possible to tell if an Operand is being read from or written to by the current instruction. This kind of information would be very useful to expose, otherwise users have to resort to heuristics in order to determine operand behavior.

Thanks!