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

Pengfei Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 22 08:14:14 PDT 2019


pengfei created this revision.
pengfei added reviewers: rnk, RKSimon, craig.topper, annita.zhang, LuoYuanke, andrew.w.kaylor.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.

This is an alternate approach to D63396 <https://reviews.llvm.org/D63396>

Currently funclets reuse the same stack slots that are used in the
parent function for saving callee-saved xmm registers. If the parent
function modifies a callee-saved xmm register before an excpetion is
thrown, the catch handler will overwrite the original saved value.

This patch allocates space in funclets stack for saving callee-saved xmm
registers and uses RSP instead RBP to access memory.

Signed-off-by: Pengfei Wang <pengfei.wang at intel.com>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D66596

Files:
  llvm/lib/Target/X86/X86FrameLowering.cpp
  llvm/lib/Target/X86/X86FrameLowering.h
  llvm/lib/Target/X86/X86MachineFunctionInfo.h
  llvm/lib/Target/X86/X86RegisterInfo.cpp
  llvm/test/CodeGen/X86/avx512-intel-ocl.ll
  llvm/test/CodeGen/X86/catchpad-realign-savexmm.ll
  llvm/test/CodeGen/X86/win64-funclet-savexmm.ll
  llvm/test/CodeGen/X86/x86-interrupt_cc.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66596.216627.patch
Type: text/x-patch
Size: 17895 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190822/84e92896/attachment.bin>


More information about the llvm-commits mailing list