[libunwind][LoongArch] Restore $r1 before $r4 in `jumpto`
authorWeining Lu <luweining@loongson.cn>
Fri, 7 Apr 2023 05:38:44 +0000 (13:38 +0800)
committerWeining Lu <luweining@loongson.cn>
Fri, 7 Apr 2023 05:42:23 +0000 (13:42 +0800)
commitff0aabf14dfa0a369c38f6e267c56a83ee48d647
tree180d50cd29266e28dbe8e0ced5d98f3e7867641f
parent366c5474a3002114b8980ab278d93baa96046385
[libunwind][LoongArch] Restore $r1 before $r4 in `jumpto`

$ra should be restored before $a0, otherwise the baseaddress ($a0) would
be destroyed. See file `UnwindRegistersSave.S` for reference.

This also makes libcxx and libcxxabi regtest pass for the `-DLIBCXXABI_USE_LLVM_UNWINDER=ON` build.

Reviewed By: MaskRay, xen0n, #libunwind

Differential Revision: https://reviews.llvm.org/D147372
libunwind/src/UnwindRegistersRestore.S
libunwind/test/unw_resume.pass.cpp