Skip to content

Commit bf1758d

Browse files
zhaixiaojuanheiher
authored andcommitted
Define UNWIND_DATA_REG for loongarch64
1 parent 737e1d2 commit bf1758d

File tree

1 file changed

+3
-0
lines changed
  • library/std/src/personality

1 file changed

+3
-0
lines changed

Diff for: library/std/src/personality/gcc.rs

+3
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ const UNWIND_DATA_REG: (i32, i32) = (0, 1); // R0, R1
7777
#[cfg(any(target_arch = "riscv64", target_arch = "riscv32"))]
7878
const UNWIND_DATA_REG: (i32, i32) = (10, 11); // x10, x11
7979

80+
#[cfg(target_arch = "loongarch64")]
81+
const UNWIND_DATA_REG: (i32, i32) = (4, 5); // a0, a1
82+
8083
// The following code is based on GCC's C and C++ personality routines. For reference, see:
8184
// https://github.com/gcc-mirror/gcc/blob/master/libstdc++-v3/libsupc++/eh_personality.cc
8285
// https://github.com/gcc-mirror/gcc/blob/trunk/libgcc/unwind-c.c

0 commit comments

Comments
 (0)