Summary
In this chapter, you learned how to create a LLVM target description, and you developed a simple backend target that supports the assembling and disassembling of instructions for LLVM. You first collected the required documentation and made LLVM aware of the new architecture by enhancing the Triple
class. The documentation also includes the relocation definition for the ELF file format, and you added the support for them to LLVM.
You then learned about the register definition and the instruction definition in the target description and used the generated C++ source code to implement an instruction assembler and disassembler.
In the next chapter, we will add code generation to the backend.