The translation from LLVM IR to generic machine code is mostly fixed. As a result, instructions can be generated that…
For translating the LLVM IR to generic machine instructions, we only need to implement how arguments and return values are…
Finally, we can implement the M88kTargetMachine class. This class holds all used sub-target instances. It also owns a subclass of…
Creating the target machine and the sub-targetSo far, we’ve implemented the instruction selection classes and a couple of other classes.…
The binary interface of a platform not only defines how parameters are passed. It also includes how a stack frame…
The M88kInstrInfo class has many hook methods we can override to accomplish special tasks, for example, for branch analysis and…
One crucial part is still missing: we need to define the pass that performs the DAG transformations defined in the…
Let’s turn to another important task performed by the M88kISelLowering class. We defined the rules for the calling convention in…
Let’s implement the M88kISelLowering class, which is stored in M88kISelLowering.cpp file, first. The constructor configures the legal types and operations:…
Implementing the disassembler is optional. However, the implementation does not require too much effort, and generating the disassembler table may…