[PATCH] D125433: [ARM64][SEH] PR54879: Packed Unwind Info when Homing Int Param Regs

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 11 18:27:27 PDT 2022


efriedma added inline comments.


================
Comment at: llvm/lib/MC/MCWin64EH.cpp:640
+      ENops++; EI--; continue;
+    }
+    // If we reach here, we find unmatching ops that are NOT UOP_Nop.
----------------
We also use checkPackedEpilog() for to compute the epilogue offset in xdata records; we can't mess with the result for the sake of analyzing packed unwind.  If you need a different analysis, please split it into a separate function, or use a flag.  (Probably easier to understand if you split it into a separate function?)


================
Comment at: llvm/lib/MC/MCWin64EH.cpp:855
+             // Homing int param regs
+             (PackedEpilogOffset == 5 && H == 1)) {
+    // One single case of differences between prolog and epilog is allowed:
----------------
Could use a comment explaining where "5" here comes from.

I think if H == 1, we need to reject PackedEpilogOffset == 0 and PackedEpilogOffset == 1.  If the unwinder sees packed unwind, it will assume the epilogue doesn't contain any nops.  So if the epilogue does in fact contain nops for some reason, the stack offsets will get messed up.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D125433



More information about the llvm-commits mailing list