KUNAI-static-analyzer
KUNAI-static-analyzer copied to clipboard
Work in MjolnIR Lifter
For some of the passes to work correctly, it's needed to have in some of the instructions the same type both for operands and for result values. MjolnIR Lifter right now has some problems creating new instructions like cast
instructions, since they generate new values that are not taking into account for the already created basic blocks. It's needed to create some triggers or some way for re-generating instructions if a new instruction that change values is included. Lifter's code should be cleaned and improved.
For example, in case we need to add the different types of cast
instructions, it would be useful the next:
- Have a function that check for the proper type for values being casted to.
- Generate
cast
instruction. - Look for uses of the resulted value, re-generate those instructions in order to retrieve the last generated value.
Other utilities could be included at Lifter's code, example, for including instructions at the end of a block, for obtaining addresses of blocks, etc.