RISC-V calling convention
The rules in the RISC-V psABI for which registers carry arguments, which must be preserved and how floats are passed — written with thirty years of other architectures' mistakes to learn from.
Eight arguments go in a0–a7 (x10–x17), and the first two double as return registers. The return address sits in ra; twelve registers, s0–s11, are callee-saved, while the temporaries t0–t6 may be clobbered freely. The stack is kept 16-byte aligned. The assembler register names are not cosmetic: they are the convention, written into the register file.
Because the FPU is optional, there are several variants selected with -mabi. ilp32 and lp64 pass everything in integer registers, whereas lp64d puts doubles in fa0–fa7, which is what Linux distributions use. Object files built for different variants refuse to link. Variadic arguments always go in integer registers, so printf never has to guess where the floats went. The specification is maintained in the open on GitHub, which is unusual for this kind of document.