[llvm] [BOLT][AArch64] Fixed indirect call instrumentation snippet (PR #141918)
Paschalis Mpeis via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 6 04:20:16 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:
Great, thanks for resolving [this](https://github.com/llvm/llvm-project/pull/141918/files#r2491131683) Alexey! And sorry for the earlier confusion. Now that the extra push is reflected (line 2510), I think we could restore back the adr -> adrp+add line, so we match `createInstrumentedIndirectCall` comments, WDYT?
```suggestion
// adr x0, InstrTrampoline -> adrp + add
```
https://github.com/llvm/llvm-project/pull/141918
More information about the llvm-commits
mailing list