bigassm icon indicating copy to clipboard operation
bigassm copied to clipboard

Covering 128-bits of address space with immediates and labels

Open fwsGonzo opened this issue 2 years ago • 1 comments

Right now there are special pseudo-instructions meant to help with:

  1. Loading large integer into register
  2. Loading large addresses into register
  3. 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.

fwsGonzo avatar Sep 19 '21 13:09 fwsGonzo

For now there is the set pseudo-instruction which uses an intermediate register to build large constants.

fwsGonzo avatar Sep 20 '21 18:09 fwsGonzo