Liste des Groupes | Revenir à c arch |
On 9/17/2024 6:04 PM, MitchAlsup1 wrote:
How very much simpler is::Still limited to 32-bit displacement from IP.>
>
How would you perform the following call::
current IP = 0x0000000000001234
target IP = 0x7FFFFFFF00001234
>
This is a single (2-word) instruction in my ISA, assuming GOT is
32-bit displaceable and 64-bit entries.
>
Granted, but in plain RISC-V, there is no real better option.
>
If one wants to generate 64-bit displacement, and doesn't want to load a
constant from memory:
LUI X6, Disp20Hi //20 bits
ADDI X6, X6, Disp12Hi //12 bits
AUIPC X7, Disp20Lo
ADD X7, Disp12Lo
SLLI X6, X6, 32
ADD X7, X7, X6
>Just put in real constants.
Which is sort of the whole reason I am considering hacking around it
with an alternate encoding scheme.
>Where is the indexing register?
New encoding scheme can in theory do:
LEA X7, PC, Disp64
In a single 96-bit instruction.
>------------
>>
AUPIC is (and remains) a crutch (like LUI from MIPS)
a) it consumes an instruction (space and time)
b) it consumes a register unnecessarily
c) it consumes power that direct delivery of the constant would not
Yeah, pretty much.
LUI + AUIPC + JAL, eat nearly 27 bits of encoding space.
>
Les messages affichés proviennent d'usenet.