[PATCH] D142572: [AArch64] fix bug #55005 handle DW_CFA_GNU_window_save
Sebastian Pop via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 26 08:49:14 PST 2023
sebpop updated this revision to Diff 492467.
sebpop added a comment.
I added a testcase, however I was not able to check if the test catches the issue.
I need some help on how to run the bolt tests.
I did a `make check-all` in a build with `-DLLVM_ENABLE_PROJECTS="clang;bolt"` however that did not include the test that I added, as it is supposed to fail without the current patch.
I also tried to run the test directly with lit, and that failed as well.
Could somebody point me to the docs that describe how to run the bolt tests?
Thank you.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142572/new/
https://reviews.llvm.org/D142572
Files:
bolt/lib/Core/Exceptions.cpp
bolt/test/AArch64/dw_cfa_gnu_window_save.cc
Index: bolt/test/AArch64/dw_cfa_gnu_window_save.cc
===================================================================
--- /dev/null
+++ bolt/test/AArch64/dw_cfa_gnu_window_save.cc
@@ -0,0 +1,10 @@
+// RUN: %clang %cflags -O2 -Wl,-q %s -o %t.exe
+// RUN: llvm-bolt %t.exe -o %t.bolt 2>&1 | FileCheck %s
+
+// CHECK-NOT: paciasp
+// CHECK-NOT: autiasp
+// CHECK-NOT: ERROR: unable to fill CFI.
+
+int main(int argc, char **argv) {
+ return 0;
+}
Index: bolt/lib/Core/Exceptions.cpp
===================================================================
--- bolt/lib/Core/Exceptions.cpp
+++ bolt/lib/Core/Exceptions.cpp
@@ -626,11 +626,13 @@
errs() << "BOLT-WARNING: DW_CFA_MIPS_advance_loc unimplemented\n";
return false;
case DW_CFA_GNU_window_save:
+ Function.addCFIInstruction(
+ Offset, MCCFIInstruction::createNegateRAState(nullptr));
+ break;
case DW_CFA_lo_user:
case DW_CFA_hi_user:
if (opts::Verbosity >= 1) {
- errs() << "BOLT-WARNING: DW_CFA_GNU_* and DW_CFA_*_user "
- "unimplemented\n";
+ errs() << "BOLT-WARNING: DW_CFA_*_user unimplemented\n";
}
return false;
default:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142572.492467.patch
Type: text/x-patch
Size: 1189 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230126/d11e0a3f/attachment.bin>
More information about the llvm-commits
mailing list