Question: llvm how to write a backend?
Answer: Create a subclass of the TargetMachine class that describes characteristics of your target machine. ... 
Describe the register set of the target.