Creating the target description
The target description is the heart of a backend implementation. It is written in the TableGen language and defines the basic properties of an architecture, such as the registers and the instruction formats and patterns for instruction selection. If you are not familiar with the TableGen language, then we recommend reading Chapter 8, The TableGen Language, first. The base definitions are in the llvm/include/llvm/Target/Target.td
file, which can be found online at https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/Target/Target.td. This file is heavily commented on and is a useful source of information about the use of the definitions.
In an ideal world, we would generate the whole backend from the target description. This goal has not yet been reached, and therefore, we will need to extend the generated code later. Because of its size, the target description is split into several files. The top-level file will be M88k.td
, inside the...