you know what the most cursed thing is about riscv? the assembly format lacks semantic consistency.

this is how they write the load and store instructions:

lw a0, 4(sp)
sw a0, 4(sp)

the first one loads a word from the memory address sp+4 into register a0. the second one stores the word from register a0 into the memory address sp+4. so the first one assigns right to left, and the second assigns left to right.

cursed.

0

If you have a fediverse account, you can quote this note from your own instance. Search https://chaos.social/users/gsuberland/statuses/115589393554829197 on your instance and quote it. (Note that quoting is not supported in Mastodon.)