https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110665
--- Comment #2 from Lehua Ding <lehua.ding at rivai dot ai> --- I just found the relevant specification and the specification seems to require that the vector registers used be saved. > The interrupt attribute specifies that a function is an interrupt handler. > The compiler will save/restore all used registers in the prologue/epilogue > regardless of the ABI, all used registers including floating point > register/vector register if F extension/vector extension is enabled. From https://github.com/riscv-non-isa/riscv-c-api-doc/blob/master/riscv-c-api.md#__attribute__interrupt-__attribute__interruptuser-__attribute__interruptsupervisor-__attribute__interruptmachine