I've got to say that this convention makes writing leaf functions in assembly particularly trivial!
Register usage - thank you! Paul On Mon, Jun 23, 2025 at 9:33 AM Richard Miller <[email protected]> wrote: > > Thanks Richard - what I'm missing is which registers I'm responsible for > > saving. > > Plan 9 C compilers are always caller-save, so you don't have to save > anything (unless you're using extern registers). > > Register usage (REGARG, REGRET, etc) for the Plan 9 riscv compiler is > defined in /sys/src/cmd/ic/i.out.h > > Geoff's code has a lot of useful comments about the SBI conventions, > for example that SP has to be 16-byte aligned. > ------------------------------------------ 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/T48f47cc224c8e8f0-Mac8024a1950d561a1ee47fc3 Delivery options: https://9fans.topicbox.com/groups/9fans/subscription
