-
Hello, I'd like to find a way to detect that the absolute form of an instruction is the same as its relative form. For instance, instructions such as "ret", "push ", etc have the same absolute and relative forms since there is no address involved. So far, I've "guessed" that if an instruction does not have a memory operand or (has a memory operand but no displacement) then its absolute and relative forms will be the same. My first question is: is the above statement always correct or am I overlooking a situation where the determination requires additional tests ? My second question is: what is the simplest way (least amount of work, easy to understand, straightforward to code) of determining that an instruction has the same absolute and relative forms ? Lastly and, just as something related, if there isn't a really very quick way of making the determination at this time then, it would be nice if a bit in the attributes was set aside to denote that the instruction's absolute and relative forms are the same. thank you for your help. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
For whole instruction: Finding specific relative operand:
|
Beta Was this translation helpful? Give feedback.
For whole instruction:
ZYDIS_ATTRIB_IS_RELATIVE
Finding specific relative operand:
imm.is_relative
EIP
/RIP