[PATCH] D51524: [ARM64] [Windows] Handle funclets

Sanjin Sijaric via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 30 17:30:06 PDT 2018


ssijaric added inline comments.


================
Comment at: lib/Target/AArch64/AArch64FrameLowering.cpp:1668-1672
+  const MachineFrameInfo &MFI = MF.getFrameInfo();
+  LLVM_DEBUG(dbgs() << "Offset from SP for " << FI << " is "
+                    << MFI.getObjectOffset(FI) << "\n");
+  FrameReg = AArch64::SP;
+  return MFI.getObjectOffset(FI);
----------------
MatzeB wrote:
> doesn't this change the behavior for non-funclets too? If yes this needs to go into a separate patch and needs some comments why.
This is used to calculate displacement of objects from the stack pointer, such as the displacement of the unwind object when filling up the exception handling table on Windows.  This is the only place where it is used for AArch64.  All the frame indices belong to the parent function (e.g. never a funclet).   I put it in this patch, because the unwind object above is created only if the function has funclets.

It may be hard to write a test case that checks the .s file, as it will crash with an assert in the WinException sanity check (since the displacement will be that from the frame pointer).  I would like to keep in this patch, if at all possible.  If there is a really strong objection, I can move it to a separate patch.


Repository:
  rL LLVM

https://reviews.llvm.org/D51524





More information about the llvm-commits mailing list