riscv-non-isa / riscv-c-api-doc

Documentation of the RISC-V C API
https://jira.riscv.org/browse/RVG-4
Creative Commons Attribution 4.0 International
68 stars 38 forks source link

Save CSRs in interrupt functions #42

Closed palmer-dabbelt closed 4 months ago

palmer-dabbelt commented 1 year ago

Link: https://inbox.sourceware.org/gcc-patches/20230613064126.1323-1-jinma@linux.alibaba.com/

nick-knight commented 1 year ago

I think the original intent was to save/restore all (ISR-modified) architectural state associated with these extensions, which in these cases means the data registers and CSRs. I guess the confusion is that the doc just said "floating point/vector register[s]", which could be misread as only referring to the data registers, and excluding the CSRs. I think this clarification could be implemented by adding a few words to the previous sentence, rather than adding another one. But it's fine.