diff options
-rw-r--r-- | libunwind/src/UnwindRegistersRestore.S | 4 | ||||
-rw-r--r-- | libunwind/test/unw_resume.pass.cpp | 5 |
2 files changed, 2 insertions, 7 deletions
diff --git a/libunwind/src/UnwindRegistersRestore.S b/libunwind/src/UnwindRegistersRestore.S index 543b19f7e72a..951189ea54dd 100644 --- a/libunwind/src/UnwindRegistersRestore.S +++ b/libunwind/src/UnwindRegistersRestore.S @@ -1221,8 +1221,8 @@ DEFINE_LIBUNWIND_FUNCTION(_ZN9libunwind19Registers_loongarch6jumptoEv) ld.d $r\i, $a0, (8 * \i) .endr - ld.d $r4, $a0, (8 * 4) // restore $a0 last - ld.d $r1, $a0, (8 * 32) // load new pc into $ra + ld.d $ra, $a0, (8 * 32) // load new pc into $ra + ld.d $a0, $a0, (8 * 4) // restore $a0 last jr $ra diff --git a/libunwind/test/unw_resume.pass.cpp b/libunwind/test/unw_resume.pass.cpp index e652620a4a05..76273e4a8ef0 100644 --- a/libunwind/test/unw_resume.pass.cpp +++ b/libunwind/test/unw_resume.pass.cpp @@ -16,11 +16,6 @@ // TODO: Figure out why this fails with Memory Sanitizer. // XFAIL: msan -// FIXME: The return address register($ra/$r1) is restored with a destroyed base -// address register($a0/$r4) in the assembly file `UnwindRegistersRestore.S` on -// LoongArch. And we will fix this issue in the next commit. -// XFAIL: target={{loongarch64-.+}} - #include <libunwind.h> void test_unw_resume() { |