[llvm-branch-commits] [llvm] [AArch64][PAC] Lower authenticated calls with ptrauth bundles. (PR #85736)
Daniil Kovalev via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed May 22 01:49:12 PDT 2024
================
@@ -1769,6 +1775,39 @@ void AArch64AsmPrinter::emitPtrauthAuthResign(const MachineInstr *MI) {
OutStreamer->emitLabel(EndSym);
}
+void AArch64AsmPrinter::emitPtrauthBranch(const MachineInstr *MI) {
+ unsigned InstsEmitted = 0;
+
+ unsigned BrTarget = MI->getOperand(0).getReg();
+ auto Key = (AArch64PACKey::ID)MI->getOperand(1).getImm();
----------------
kovdan01 wrote:
There is an assertion against `Disc` that it fits 16 bits, we probably want to have an assertion against `Key` as well. For example, in `AArch64AsmPrinter::emitInstruction` below this approach is already used - we first store the `Key` as `uint64_t` and then check that it's value is valid.
https://github.com/llvm/llvm-project/pull/85736
More information about the llvm-branch-commits
mailing list