[llvm] [BOLT][AArch64] Fixed indirect call instrumentation snippet (PR #141918)

Paschalis Mpeis via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 6 06:39:07 PST 2025


================
@@ -2459,11 +2503,13 @@ class AArch64MCPlusBuilder : public MCPlusBuilder {
   createInstrumentedIndCallHandlerEntryBB(const MCSymbol *InstrTrampoline,
                                           const MCSymbol *IndCallHandler,
                                           MCContext *Ctx) override {
-    // Code sequence used to check whether InstrTampoline was initialized
+    // Code sequence used to check whether InstrTrampoline was initialized
     // and call it if so, returns via IndCallHandler
     //   stp     x0, x1, [sp, #-16]!
     //   mrs     x1, nzcv
-    //   adr     x0, InstrTrampoline -> adrp + add
+    //   str     x1, [sp, #-16]!
+    //   adrp    x0, InstrTrampoline
+    //   add     x0, x0, #lo12:InstrTrampoline
----------------
paschalis-mpeis wrote:

Alright, sounds good! It'll be reflected on the upcoming test anyway (disassembly of `bolt_instr_ind_call_handler_func`).

https://github.com/llvm/llvm-project/pull/141918


More information about the llvm-commits mailing list