ARM indexing modes
Closed this issue · 5 comments
tmr232 commented
Currently, Sark does not provide information about ARM pre-index and post-index options.
This can be done using insn_t.auxpref
:
Flag | Meaning |
---|---|
0 | Regular indexing |
0x20 | Pre-Index |
0x80 | Post-Index |
The main issue is whether to add it as a property of the instruction (probably), the operand (less likely), or both.
ronyrus commented
I would go with the instruction only approach.
tmr232 commented
I uploaded a first draft of the API. Instruction
objects now have a indexing_mode
property of type IndexingMode
. So you can use:
# Check for pre-indexing
sark.Line().insn.indexing_mode.is_pre
# Check for post-indexing
sark.Line().insn.indexing_mode.is_post
# Check for normal addressing
sark.Line().insn.indexing_mode.is_none
# Another check for normal addressing
bool(sark.Line().insn.indexing_mode)
@ronyrus , I'd appreciate it if you can check it out and see if it works as expected.
ronyrus commented
seems to be working well 👍
tmr232 commented
Any inputs on the API?
ronyrus commented
Looks fine to me. Is there something specific bothering you?