Connecting the MC layer
Both the registers and the instruction descriptions contribute to defining the MC layer of your backend through the MCRegisterInfo
and MCInstrInfo
classes. In the examples of Chapter 11, we showed the minimal examples for these descriptions to work but they did not contain enough information to really grasp the interest of the MC layer.
In this section, we will show you how to augment these descriptions to be able to tap into the functionalities offered by the MC layer. In other words, now that you have grasped how to define registers and instructions, thanks to Chapter 11, we can focus on adding the assembly code and encoding support on top of this knowledge instead of mixing everything all at once.
We keep the plumbing part to the section named Enabling MC-based tools and instead focus in this section on how to augment your records with the proper information for MC enablement. Before we see what this looks like, let us step back and answer an obvious...