Skip to content

Commit

Permalink
Define UNWIND_DATA_REG for loongarch64
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaixiaojuan authored and heiher committed Apr 7, 2023
1 parent 737e1d2 commit bf1758d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions library/std/src/personality/gcc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ const UNWIND_DATA_REG: (i32, i32) = (0, 1); // R0, R1
#[cfg(any(target_arch = "riscv64", target_arch = "riscv32"))]
const UNWIND_DATA_REG: (i32, i32) = (10, 11); // x10, x11

#[cfg(target_arch = "loongarch64")]
const UNWIND_DATA_REG: (i32, i32) = (4, 5); // a0, a1

// 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
Expand Down

0 comments on commit bf1758d

Please sign in to comment.