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…

Instruction selection via the selection DAG produces fast code, but it takes time to do so. The speed of the…

After, we define the getSubtargetImpl() method. The sub-target instance to use depends on the target-cpu and target-features function attributes. For…

The implementation of the class is stored in the M88kTargetMachine.cpp file. Please note that we created this file in Chapter…

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 instruction selection creates machine instructions, represented by the MachineInstr class, from LLVM IR. But this is not the end.…

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…