Module falcon::translator
source · Expand description
Translators for various architectures to Falcon IL.
Translators in Falcon do not lift individual instructions, but instead lift basic blocks. This is both more performant than lifting individual instructions, and allows Falcon to deal with weird cases such as the delay slot in the MIPS architecture.
Translators lift individual instructions to ControlFlowGraph
, and combine
these graphs to form a single block. A single instruction may lift to not
only multiple Falcon IL instructions, but also multiple IL blocks.
Instructions for direct branches in Falcon IL are omitted in the IL, and instead edges with conditional guards are emitted. The Brc operation is only emitted for indirect branches, and instructions which are typically used to call other functions.
If you are lifting directly from loader (Elf/PE/other), you do not need to pay attention to the translators. The correct translator will be chosen automatically.