Skip to content

Latest commit

 

History

History
16 lines (11 loc) · 602 Bytes

calling-convention.adoc

File metadata and controls

16 lines (11 loc) · 602 Bytes

Appendix A: Calling Convention

In the RISC-V psABI, the vector registers v0-v31 are all caller-saved. The vstart, vl, and vtype CSRs are also caller-saved.

The vxrm and vxsat fields have thread storage duration.

Executing a system call causes v0-v31 to become unspecified.

Note
This scheme allows system calls that cause context switches to avoid saving and later restoring the vector registers.
Note
The values that v0-v31 assume after a system call cannot expose information from other processes, so typically the registers will either remain intact or will be zeroed.