[libunwind] [RISCV] Allow libunwind to build for rv32e (PR #98855)

via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 1 08:48:01 PDT 2024


================
@@ -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)
----------------
ArcaneNibble wrote:

I deliberately chose to base it on the ABI so that, in the "ilp32e on hardware with 32 registers" situation, code won't try to touch the extra registers. This would allow "evil" code to freely use them to stash all kinds of extra state and depend on the fact that compiled code will leave it alone.

https://github.com/llvm/llvm-project/pull/98855


More information about the cfe-commits mailing list