]> granicus.if.org Git - llvm/commit
[WinEH] Allocate space in funclets stack to save XMM CSRs
authorPengfei Wang <pengfei.wang@intel.com>
Fri, 26 Jul 2019 07:33:15 +0000 (07:33 +0000)
committerPengfei Wang <pengfei.wang@intel.com>
Fri, 26 Jul 2019 07:33:15 +0000 (07:33 +0000)
commit9889150b54b474b85aa6b8c879c9729680f21cc6
tree747a8da8c93b04b4f0a3469e781b23674cb76952
parentfe595b3752e781ea58d0b36786baea11f09489df
[WinEH] Allocate space in funclets stack to save XMM CSRs

Summary:
This is an alternate approach to D57970.
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.

Reviewers: andrew.w.kaylor, LuoYuanke, annita.zhang, craig.topper,
RKSimon

Subscribers: rnk, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D63396

Signed-off-by: pengfei <pengfei.wang@intel.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367088 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86FrameLowering.cpp
lib/Target/X86/X86FrameLowering.h
lib/Target/X86/X86MachineFunctionInfo.h
test/CodeGen/X86/avx512-intel-ocl.ll
test/CodeGen/X86/catchpad-realign-savexmm.ll
test/CodeGen/X86/win64-funclet-savexmm.ll [new file with mode: 0644]
test/CodeGen/X86/x86-interrupt_cc.ll