[PATCH] D142572: [AArch64] fix bug #55005

Amir Ayupov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 25 11:35:30 PST 2023


Amir created this revision.
Amir added a reviewer: bolt.
Herald added subscribers: ayermolo, kristof.beyls.
Herald added a reviewer: rafauler.
Herald added a reviewer: maksfb.
Herald added a project: All.
Amir requested review of this revision.
Herald added subscribers: llvm-commits, yota9.
Herald added a project: LLVM.

GCC on AArch64 uses DW_CFA_GNU_window_save for return address signing.

In architecture revisions prior to ARMv8.3-A the pointer authentication
HINT instructions operate as NOPs.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D142572

Files:
  bolt/lib/Core/Exceptions.cpp


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::createWindowSave(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.492201.patch
Type: text/x-patch
Size: 739 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230125/f4b1d94f/attachment.bin>


More information about the llvm-commits mailing list