mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 02:33:06 +01:00
X86: modify PreserveAll CC to save full AVX-512 state
This commit is contained in:
parent
2e65b3a418
commit
c36b21c023
@ -1129,6 +1129,9 @@ def CSR_64_RT_AllRegs : CalleeSavedRegs<(add CSR_64_RT_MostRegs,
|
|||||||
(sequence "XMM%u", 0, 15))>;
|
(sequence "XMM%u", 0, 15))>;
|
||||||
def CSR_64_RT_AllRegs_AVX : CalleeSavedRegs<(add CSR_64_RT_MostRegs,
|
def CSR_64_RT_AllRegs_AVX : CalleeSavedRegs<(add CSR_64_RT_MostRegs,
|
||||||
(sequence "YMM%u", 0, 15))>;
|
(sequence "YMM%u", 0, 15))>;
|
||||||
|
def CSR_64_RT_AllRegs_512 : CalleeSavedRegs<(add CSR_64_RT_MostRegs,
|
||||||
|
(sequence "K%u", 0, 7),
|
||||||
|
(sequence "ZMM%u", 0, 31))>;
|
||||||
|
|
||||||
def CSR_64_MostRegs : CalleeSavedRegs<(add RBX, RCX, RDX, RSI, RDI, R8, R9, R10,
|
def CSR_64_MostRegs : CalleeSavedRegs<(add RBX, RCX, RDX, RSI, RDI, R8, R9, R10,
|
||||||
R11, R12, R13, R14, R15, RBP,
|
R11, R12, R13, R14, R15, RBP,
|
||||||
|
@ -306,6 +306,8 @@ X86RegisterInfo::getCalleeSavedRegs(const MachineFunction *MF) const {
|
|||||||
case CallingConv::PreserveMost:
|
case CallingConv::PreserveMost:
|
||||||
return CSR_64_RT_MostRegs_SaveList;
|
return CSR_64_RT_MostRegs_SaveList;
|
||||||
case CallingConv::PreserveAll:
|
case CallingConv::PreserveAll:
|
||||||
|
if (HasAVX512)
|
||||||
|
return CSR_64_RT_AllRegs_512_SaveList;
|
||||||
if (HasAVX)
|
if (HasAVX)
|
||||||
return CSR_64_RT_AllRegs_AVX_SaveList;
|
return CSR_64_RT_AllRegs_AVX_SaveList;
|
||||||
return CSR_64_RT_AllRegs_SaveList;
|
return CSR_64_RT_AllRegs_SaveList;
|
||||||
@ -429,6 +431,8 @@ X86RegisterInfo::getCallPreservedMask(const MachineFunction &MF,
|
|||||||
case CallingConv::PreserveMost:
|
case CallingConv::PreserveMost:
|
||||||
return CSR_64_RT_MostRegs_RegMask;
|
return CSR_64_RT_MostRegs_RegMask;
|
||||||
case CallingConv::PreserveAll:
|
case CallingConv::PreserveAll:
|
||||||
|
if (HasAVX512)
|
||||||
|
return CSR_64_RT_AllRegs_512_RegMask;
|
||||||
if (HasAVX)
|
if (HasAVX)
|
||||||
return CSR_64_RT_AllRegs_AVX_RegMask;
|
return CSR_64_RT_AllRegs_AVX_RegMask;
|
||||||
return CSR_64_RT_AllRegs_RegMask;
|
return CSR_64_RT_AllRegs_RegMask;
|
||||||
|
Loading…
Reference in New Issue
Block a user