[PATCH] D88699: [AArch64] Allow pairing lr with other GPRs for WinCFI

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 1 23:25:17 PDT 2020


mstorsjo added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp:1318
+    if (MI->getOperand(1).getImm() == 30 && MI->getOperand(0).getImm() >= 19 &&
+        MI->getOperand(0).getImm() <= 28) {
+      TS->EmitARM64WinCFISaveLRPair(MI->getOperand(0).getImm(),
----------------
efriedma wrote:
> Looking at the reference, the first number should be an odd number between 19 and 27.
Oh, good catch, I had forgotten about that restriction.


================
Comment at: llvm/test/CodeGen/AArch64/wineh-save-lrpair2.mir:5
+# Check that lr isn't paired with a GPR if it's the first pair, as
+# that can't be described as a SEH opcode if combined with predecrement.
+
----------------
efriedma wrote:
> It would probably be slightly more efficient to express this as alloc_s followed by save_lrpair, but I guess we can look into that as a followup.
Yeah, that would probably be more efficient. Not sure exactly where to poke things to achieve that though...


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D88699



More information about the llvm-commits mailing list