top | item 42799265

(no title)

netr0ute | 1 year ago

This is basically irrelevant now that better ISAs like RISC-V have a fixed instruction length (2 or 4 bytes) so the fancy algorithm here isn't necessary.

discuss

order

lifthrasiir|1 year ago

That fancy algorithm is relevant to RISC-V (and in fact, most fixed-length ISAs) because loading an immediate into a register needs one or two instructions depending on the immediate; you surely want to elide a redundant LUI instruction if you can. Of course such redundant instructions don't harm by itself, but that equally applies to x86 as the algorithm is an optimization.

Coolbeanstoo|1 year ago

As a result of RISC-V existing, all x86 processors have ceased to exist or be produced.

snvzz|1 year ago

Accurate, if said sometime in the future rather than today.

remexre|1 year ago

This same problem applies to RISC-V with the C extension, because the J and JAL instructions have a larger range than the C.J and C.JAL instructions.

nicebyte|1 year ago

ARM would have been a better example because the amount of people that care about RISC-V is a rounding error compared to x86 or ARM.