Thanks Richard - what I'm missing is which registers I'm responsible for
saving.  The standard RiscV ABI uses a mix of caller vs callee saved and
parameters passed in registers.  Our convention differs, but I don't know
how with respect to riscv.

Thanks,
  Paul

On Mon, Jun 23, 2025 at 3:50 AM Richard Miller <[email protected]> wrote:

> >  I'd like a smidge of documentation on the calling convention.
> 
> As with the other Plan 9 compilers, the '-S' option for ic/jc will
> show you the function call and entry sequences, in a syntax which
> is meant to be acceptable by ia/ja. The '-a' option for il/jl will
> show you the actual machine instructions generated.
> 
> Geoff Collyer's 9k riscv64 port has a wrapper for calling the SBI
> from C, in /sys/src/9k/rv/sbiecall.s
> 

------------------------------------------
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T48f47cc224c8e8f0-M001208a3f19dd0030134e6e1
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

Reply via email to