# riscv: basic function arguments · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/5e770407cf50ae8cd103644c8ca297da52adb5b8)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 5e770407cf50ae8cd103644c8ca297da52adb5b8

Requested commit: 5e770407cf50ae8cd103644c8ca297da52adb5b8

Commit: 5e770407cf50ae8cd103644c8ca297da52adb5b8

Tree: 62696d66694b492b9327f1241b8e699a17dc0b14

Author: David Rubin

Committer: David Rubin

## Message

```
riscv: basic function arguments

- rename setRegOrMem -> setValue
- a naive method of passing arguments by register
- gather the prologue and epilogue and generate them in Emit.zig. this is cleaner because we have the final stack size in the emit step.
- define the "fa" register set, which contains the RISC-V calling convention defined function argument registers

```

## Parents

- [dceff2592f6a6305770916499c688071563ddf0d](https://git.cafe/gitcafe/zig/commit/dceff2592f6a6305770916499c688071563ddf0d?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/5e770407cf50ae8cd103644c8ca297da52adb5b8?format=markdown)
