bigassm
bigassm copied to clipboard
Covering 128-bits of address space with immediates and labels
Right now there are special pseudo-instructions meant to help with:
- Loading large integer into register
- Loading large addresses into register
- Calling large address using JALR by building address in register
These helpful functions right now cover only 32-bits of address space, however they should cover up to 128-bits. It's a bit hard to see right now how this should be done without using a lot of unnecessary registers.
One note about the farcall instruction is that it avoids loading the integer, because it uses the immedate of the JALR instruction to build the 32-bit value, saving an instruction.
If nothing else, maybe we can solve this by just adding la64 and la128 variants that assume you know the distance is great.
For now there is the set pseudo-instruction which uses an intermediate register to build large constants.