KUNAI-static-analyzer icon indicating copy to clipboard operation
KUNAI-static-analyzer copied to clipboard

Work in MjolnIR Lifter

Open Fare9 opened this issue 1 year ago • 0 comments

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:

  1. Have a function that check for the proper type for values being casted to.
  2. Generate cast instruction.
  3. 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.

Fare9 avatar Jul 24 '23 08:07 Fare9