Skip to content

Commit 9be58d7

Browse files
lenarycmuellner
authored andcommitted
Remove User Interrupts
These have been removed from both GCC and Clang, because the underlying N extension they were based on was never ratified. This change also relaxes some of the requirements, to allow vendor interrupt modes, and combinations of (compatible) interrupt modes, which matches the LLVM implementation of SiFive interrupts.
1 parent 967f2fb commit 9be58d7

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/c-api.adoc

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ This attribute is incompatible with the `interrupt` attribute.
183183
NOTE: Be aware that compilers might have further restrictions on naked
184184
functions. Please consult your compiler's manual for more information.
185185

186-
=== `+__attribute__((interrupt))+`, `+__attribute__((interrupt("user")))+`, `+__attribute__((interrupt("supervisor")))+`, `+__attribute__((interrupt("machine")))+`
186+
=== `+__attribute__((interrupt))+`, `+__attribute__((interrupt("supervisor")))+`, `+__attribute__((interrupt("machine")))+`
187187

188188
The interrupt attribute specifies that a function is an interrupt handler.
189189
The compiler will save/restore all used registers in the prologue/epilogue
@@ -192,12 +192,13 @@ register/vector register if `F` extension/vector extension is enabled. If F or
192192
V CSRs may be modified by an interrupt function, they must be saved by the
193193
compiler.
194194

195-
The interrupt attribute can have an optional parameter to specify the mode.
196-
The possible values are `user`, `supervisor`, or `machine`.
195+
The interrupt attribute can have optional parameters to specify the mode.
196+
The possible values are `supervisor`, or `machine`, or vendor-specific values.
197197
The default value `machine` is used, if the mode is not specified.
198198

199-
The function can specify only one mode; the compiler should raise an error if a
200-
function declares more than one mode or an undefined mode.
199+
The compiler should raise an error if a function declares incompatible modes, or
200+
an undefined mode. The `supervisor` mode is incompatible with the `machine`
201+
mode.
201202

202203
This attribute is incompatible with the `naked` attribute.
203204

0 commit comments

Comments
 (0)