================ @@ -1169,7 +1169,11 @@ DEFINE_LIBUNWIND_FUNCTION(_ZN9libunwind15Registers_riscv6jumptoEv) ILOAD x\i, (RISCV_ISIZE * \i)(a0) .endr // skip a0 for now +#if defined(__riscv_abi_rve) ---------------- lenary wrote:
> The non-e case seems to be saving/restoring all registers (just like every > other architecture)? I'm not sure where you're seeing that it doesn't save > all of them? Sorry, my fault, I didn't realise there were two loops in this function and thus two different lists of registers. > > The reason the lists aren't symmetric is because register a0 is x10, so > restoring it is deferred until the end. I'm not sure why it doesn't just use > one list, but this pattern is also used for MIPS and LoongArch. Yeah, I'm happy with this. Broadly, going back to your/craig's original question: I feel this should be keyed on architecture, not ABI. This function is restoring all registers, including temporaries, not just caller-saves, so on the e-abi it should be restoring all temporaries as well. (This is different to my change to the save/restore routines, which only touch callee-saves). https://github.com/llvm/llvm-project/pull/98855 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits