[PATCH] D147372: [libunwind][LoongArch] Restore $r1 before $r4 in `jumpto`
Lu Weining via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 2 20:09:36 PDT 2023
SixWeining updated this revision to Diff 510384.
SixWeining added a comment.
use register ABI names rather raw names
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
@@ -10,11 +10,6 @@
// Ensure that unw_resume() resumes execution at the stack frame identified by
// cursor.
-// 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.510384.patch
Type: text/x-patch
Size: 1115 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230403/dd75b12d/attachment.bin>
More information about the llvm-commits
mailing list