]> granicus.if.org Git - llvm/commit
[WinEH] Allocate space in funclets stack to save XMM CSRs
authorPengfei Wang <pengfei.wang@intel.com>
Tue, 27 Aug 2019 01:53:24 +0000 (01:53 +0000)
committerPengfei Wang <pengfei.wang@intel.com>
Tue, 27 Aug 2019 01:53:24 +0000 (01:53 +0000)
commit3a1dfed9eb645b9fbb51159b3267e8de8afe6094
tree4d96c42d4aef3b751d2abf2416d9bdcbbc9d4c6d
parenta7be55d97c62a6de7e62b9ad38d0ecbb1c297d44
[WinEH] Allocate space in funclets stack to save XMM CSRs

Summary:
This is an alternate approach to 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@intel.com>
Reviewers: rnk, RKSimon, craig.topper, annita.zhang, LuoYuanke, andrew.w.kaylor

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

Signed-off-by: Pengfei Wang <pengfei.wang@intel.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370005 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86FrameLowering.cpp
lib/Target/X86/X86FrameLowering.h
lib/Target/X86/X86MachineFunctionInfo.h
lib/Target/X86/X86RegisterInfo.cpp
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