Understanding the machine code framework
The machine code (MC for short) classes comprise an entire framework for low-level manipulation of functions and instructions. In comparison with other backend components, this is a new framework that was designed to aid in the creation of LLVM-based assemblers and disassemblers. Previously, LLVM lacked an integrated assembler and was only able to proceed with the compilation until the assembly language emission step, which created an assembly text file as output and depended on external tools to carry on the rest of the compilation (assembler and linker).
MC instructions
In the MC framework, machine code instructions (MCInst
) replace machine instructions (MachineInstr
). The MCInst
class, defined in the ...
Get Getting Started with LLVM Core Libraries now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.