Machine Code Generation for C++
General purpose register (ARM).
Special register id.
Register that depends on OS, could be used as TLS offset.
Stack register id.
Zero register id.
Although zero register has the same id as stack register it has a special treatment, because we need to be able to distinguish between these two at API level. Some intructions were designed to be used with SP and some other with ZR - so we need a way to distinguish these two to make sure we emit the right thing. The number 63 is not random, when you perform `id & 31` you would always get 31 for both SP and ZR inputs, which is the identifier used by AArch64 ISA to encode either SP or ZR depending on the instruction.