[PATCH] D63396: [WinEH] Allocate space in funclets stack to save XMM CSRs

Pengfei Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 20 02:21:03 PDT 2019


pengfei marked 3 inline comments as done.
pengfei added inline comments.


================
Comment at: llvm/lib/Target/X86/X86FrameLowering.cpp:1414
+            assert(IsWin64Prologue && "Only valid on Windows 64bit");
+            int Offset = (FI - XMMFrameSlotOrigin - 1) * 16;
+            addRegOffset(BuildMI(MBB, MBBI, DL, TII.get(X86::MOVAPSmr)),
----------------
rnk wrote:
> This math relies on too many fragile undocumented invariants:
> - frame indices are consecutive
> - frame indices are fixed (or non-fixed), one is negative, the other not
> 
> Is it possible to adjust from the assigned fixed offset in the parent frame to the funclet frame using some other MachineFrameInfo values? This MOVAPS instruction replacement seems like the correct fix, I just want to make it more robust.
Thanks for the advice.

  - I separate the slot allocation of XMM, so it should be consecutive now
  - XMM frame indices are always fixed for now


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D63396





More information about the llvm-commits mailing list