[PATCH] D147372: [libunwind][LoongArch] Restore $r1 before $r4 in `jumpto`
Lu Weining via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 6 22:44:09 PDT 2023
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
SixWeining marked an inline comment as done.
Closed by commit rGff0aabf14dfa: [libunwind][LoongArch] Restore $r1 before $r4 in `jumpto` (authored by SixWeining).
Changed prior to commit:
https://reviews.llvm.org/D147372?vs=510384&id=511618#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147372/new/
https://reviews.llvm.org/D147372
Files:
libunwind/src/UnwindRegistersRestore.S
libunwind/test/unw_resume.pass.cpp
Index: libunwind/test/unw_resume.pass.cpp
===================================================================
--- libunwind/test/unw_resume.pass.cpp
+++ 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() {
Index: libunwind/src/UnwindRegistersRestore.S
===================================================================
--- libunwind/src/UnwindRegistersRestore.S
+++ libunwind/src/UnwindRegistersRestore.S
@@ -1221,8 +1221,8 @@
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D147372.511618.patch
Type: text/x-patch
Size: 1098 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230407/752dc0c4/attachment.bin>
More information about the llvm-commits
mailing list