[PATCH] D100919: [AArch64] Support customizing stack protector guard

Dave Green via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 11 03:12:48 PDT 2021


dmgreen added a comment.

I don't know a huge amount about stack protectors.

It's worth adding -verify-machineinstrs to the tests, to check the code passes the internal checks.



================
Comment at: llvm/lib/Target/AArch64/AArch64InstrInfo.cpp:1917
+            .addDef(Reg)
+            .addImm(Options.StackProtectorGuardOffset >> 3);
+      else
----------------
What is StackProtectorGuardOffset, and could is be out of range for the load? That is something that verify-machineinstrs won't currently check for.


================
Comment at: llvm/lib/Target/AArch64/AArch64InstrInfo.cpp:1920
+        BuildMI(MBB, MI, DL, get(AArch64::LDURXi))
+            .addUse(Reg, RegState::Kill)
+            .addDef(Reg)
----------------
Defs come before Uses in machine instructions.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D100919



More information about the cfe-commits mailing list