1 # LLVM Backend Array Register Files
3 This backend is for expressing scenarios where registers have multiple
4 potential overlapping meanings and uses, including but not limited to:
6 * **MMX / SSE / SIMD**: same registers of fixed length can be subdivided into
7 multiple different SIMD elements, depending on the opcode used (or
8 special CSRs - Control Status Registers)
9 * **Virtual register redirection**: setting a CSR changes
10 the meaning of instruction opcodes to access different "banks".
11 * **Special register types**: expression of special register types,
12 not just integer and float, but shader types for use in 3D, or
14 * Variations and combinations of the above
18 ## Array Register File
20 This is for being able to express remapping / retargetting / redirection
21 schemes that a microarchitecture has.
24 start: 12; // starting index of the "register"
25 end: 12; // ending index of the "register" (inclusive)
26 id: 8; // type of register: e.g 0=float, 1=int, 2=...
35 These would indicate that when the (virtual) register ARF1 is used,
36 it is of type "integer", and it requires the reservation of the **real**
37 registers 5 through 9 at the hardware level.
39 ## Base Register Class
42 ARF: arf; // the Array Register File identifier
43 min: 12; // if an opcode restricts the available range, use this
44 max: 12; // ... and this
45 size: 8; // the element bitwidth. e.g. 0=8, 1=16, 2=32.. TBD
46 align: 4; // an aligment restriction, in powers of 2.
51 A Compressed instruction from SV has restrictions on the
52 range it may cover (unless redirection is taken into account).
53 It is also possible to specify a bitwidth of 16, and if that is
54 done, alignment has to be restricted to 4. So:
57 arf = 0x0100b008; // integer register, using "real" regs 8-11 inclusive
58 min = 8; // C-type instructions go from 8-15 in the opcode
60 size = 0x1 // 1=16-bit (?)
61 align: 2 // 2= 1<<2 (=4) because the "real" regs are 64-bit.
64 ## Register Class Unions
66 Register Classes are the union of multiple Base Register Classes
67 and traditional register classes. In this way, all possible meanings
68 and uses to which registers may be put can be expressed in one structure.
70 # Examples per Implementor
72 ## Array Register File
78 ## Base Register Class
84 ## Register Class Unions