Skip to content

Commit d4ebd38

Browse files
authored
Merge pull request #42 from palmer-dabbelt/fcsr
Save CSRs in interrupt functions
2 parents a4821a3 + 18bfdfe commit d4ebd38

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

riscv-c-api.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,9 @@ functions. Please consult your compiler's manual for more information.
185185
The interrupt attribute specifies that a function is an interrupt handler.
186186
The compiler will save/restore all used registers in the prologue/epilogue
187187
regardless of the ABI, all used registers including floating point
188-
register/vector register if `F` extension/vector extension is enabled.
188+
register/vector register if `F` extension/vector extension is enabled. If F or
189+
V CSRs may be modified by an interrupt function, they must be saved by the
190+
compiler.
189191

190192
The interrupt attribute can have an optional parameter to specify the mode.
191193
The possible values are `user`, `supervisor`, or `machine`.

0 commit comments

Comments
 (0)