Setting the stage for a new backend
Whether it's needed commercially to support a new CPU or it's only for a hobby project to add support for some old architecture, adding a new backend to LLVM is a major task. The following sections outline what you need to develop a new backend. We will add a backend for the Motorola M88k architecture, which is a RISC architecture from the 1980s.
References
You can read more about the architecture on Wikipedia: https://en.wikipedia.org/wiki/Motorola_88000. The important information about this architecture is still available on the internet. You can find the CPU manuals with the instruction set and timing information at http://www.bitsavers.org/components/motorola/88000/, and the System V ABI M88k Processor supplement with the definitions of the ELF format and the calling convention can be found at https://archive.org/details/bitsavers_attunixSysa0138776555SystemVRelease488000ABI1990_8011463.
OpenBSD, available at https://www.openbsd...