I’m playing with Backend a bit and is trying to build a backend for my toy ISA.
Registers
Each register in my ISA has three alias:
X0 refers to the full native 64bit register:
Y0 refers to the lower 32bit
Z0 refers to the lower 16bit
Q0 refers to the lower 8bit
What I did was:
- start from Q0
- for Z0, set
SubRegIndices
toSubRegIndex<8, 56>
andSubRegs
to!cast<REGISTERCLASSNAME>(Q0)
- for Y0, set
SubRegIndices
toSubRegIndex<16, 48>
andSubRegs
to!cast<REGISTERCLASSNAME>(Z0)
- for X0, set
SubRegIndices
toSubRegIndex<32, 32>
andSubRegs
to!cast<REGISTERCLASSNAME>(Y0)
I wonder if this is correct as I’m still very confused and the official documentation doesn’t seem to mention this type of register structure