[llvm] [AArch64] Codegen for AArch64 Return Address Signing Hardening (PR #176187)

Victor Campos via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 9 10:47:07 PDT 2026


================
@@ -234,6 +238,18 @@ static void emitAUTCFI(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI,
   }
 }
 
+static inline void emitMOV(MachineBasicBlock &MBB,
+                           MachineBasicBlock::iterator &MBBI, DebugLoc DL,
+                           const AArch64InstrInfo *TII, Register Dst,
+                           Register Src) {
+  assert(&MBB == MBBI->getParent());
+  BuildMI(MBB, MBBI, DL, TII->get(AArch64::ORRXrs), Dst)
+      .addReg(AArch64::XZR)
+      .addReg(Src)
+      .addImm(0)
+      .setMIFlag(MachineInstr::FrameDestroy);
----------------
vhscampos wrote:

Since all the previously existing and the new uses of emitMOV set the flag, I just renamed the function to make the operation more explicit. If you still think I should do something else, it's ok, just let me know.

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


More information about the llvm-commits mailing list