From de0d55cb3c197b13d90922c8998bf90399f3b8a2 Mon Sep 17 00:00:00 2001 From: Alistair Francis Date: Wed, 16 Sep 2020 08:42:39 -0700 Subject: [PATCH] library/panic_unwind: Add UNWIND_DATA_REG for RISC-V 32-bit Signed-off-by: Alistair Francis --- library/panic_unwind/src/gcc.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/library/panic_unwind/src/gcc.rs b/library/panic_unwind/src/gcc.rs index 85a2a18947d..81b7b556eb4 100644 --- a/library/panic_unwind/src/gcc.rs +++ b/library/panic_unwind/src/gcc.rs @@ -123,6 +123,9 @@ const UNWIND_DATA_REG: (i32, i32) = (0, 1); // R0, R1 #[cfg(target_arch = "riscv64")] const UNWIND_DATA_REG: (i32, i32) = (10, 11); // x10, x11 +#[cfg(target_arch = "riscv32")] +const UNWIND_DATA_REG: (i32, i32) = (10, 11); // x10, x11 + // The following code is based on GCC's C and C++ personality routines. For reference, see: // https://github.com/gcc-mirror/gcc/blob/master/libstdc++-v3/libsupc++/eh_personality.cc // https://github.com/gcc-mirror/gcc/blob/trunk/libgcc/unwind-c.c