library/panic_unwind: Add UNWIND_DATA_REG for RISC-V 32-bit

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
This commit is contained in:
Alistair Francis 2020-09-16 08:42:39 -07:00
parent e968f86f71
commit de0d55cb3c
1 changed files with 3 additions and 0 deletions

View File

@ -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