Unable to use callconv(.Interrupt)
for riscv targets
#20671
Labels
arch-riscv
32-bit and 64-bit RISC-V
enhancement
Solving this issue will likely involve adding new logic or components to the codebase.
frontend
Tokenization, parsing, AstGen, Sema, and Liveness.
Milestone
Zig Version
0.13.0
Steps to Reproduce and Observed Behavior
Currently compiling this function for riscv targets will yield the following error:
irq routines in riscv requires a different
mret
instruction at the end and this is achieved in C as in the following:for which LLVM generates the following code:
I dont know enough about zig/llvm internals to know if the zig
callconv(.Interrupt)
has anything to do with the way C's attributes are handled wrt llvm but it'll be useful to be able to implement riscv irq routines in pure zig.Expected Behavior
Able to use
callconv(.Interrupt)
on riscv targets.The text was updated successfully, but these errors were encountered: