[PATCH] D156018: [BOLT] Implement createRelocation for AArch64

Rafael Auler via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 7 17:30:35 PDT 2023


rafauler added inline comments.


================
Comment at: bolt/lib/Core/Relocation.cpp:349-351
+    Value -= PC;
+    assert((Value & 0xfffffffff0000000ULL) == 0 &&
+           "only PC +/- 128MB is allowed for direct call");
----------------
What happens with this assert() when the call target is at a lower address than the call instruction? (PC > Value). 


================
Comment at: bolt/lib/Target/AArch64/AArch64MCPlusBuilder.cpp:1207-1209
+    std::pair<MCSymbol *, uint64_t> result = extractFixupExpr(Fixup);
+
+    return Relocation({RelOffset, result.first, RelType, result.second, 0});
----------------
structured binding here too, just like D157217


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D156018/new/

https://reviews.llvm.org/D156018



More information about the llvm-commits mailing list