mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-11 02:16:50 +00:00
[Stackmap] Only the AnyReg calling convention should preserve all registers.
llvm-svn: 197316
This commit is contained in:
parent
310034e166
commit
36f4619753
@ -617,6 +617,11 @@ def CSR_MostRegs_64 : CalleeSavedRegs<(add RBX, RCX, RDX, RSI, RDI, R8, R9, R10,
|
||||
R11, R12, R13, R14, R15, RBP,
|
||||
(sequence "XMM%u", 0, 15))>;
|
||||
|
||||
def CSR_AllRegs_64 : CalleeSavedRegs<(add CSR_MostRegs_64, RAX, RSP,
|
||||
(sequence "XMM%u", 16, 31),
|
||||
(sequence "YMM%u", 0, 31),
|
||||
(sequence "ZMM%u", 0, 31))>;
|
||||
|
||||
// Standard C + YMM6-15
|
||||
def CSR_Win64_Intel_OCL_BI_AVX : CalleeSavedRegs<(add RBX, RBP, RDI, RSI, R12,
|
||||
R13, R14, R15,
|
||||
|
@ -239,10 +239,8 @@ X86RegisterInfo::getCalleeSavedRegs(const MachineFunction *MF) const {
|
||||
case CallingConv::HiPE:
|
||||
return CSR_NoRegs_SaveList;
|
||||
|
||||
case CallingConv::WebKit_JS:
|
||||
return CSR_64_SaveList;
|
||||
case CallingConv::AnyReg:
|
||||
return CSR_MostRegs_64_SaveList;
|
||||
return CSR_AllRegs_64_SaveList;
|
||||
|
||||
case CallingConv::Intel_OCL_BI: {
|
||||
bool HasAVX = TM.getSubtarget<X86Subtarget>().hasAVX();
|
||||
@ -301,8 +299,8 @@ X86RegisterInfo::getCallPreservedMask(CallingConv::ID CC) const {
|
||||
}
|
||||
if (CC == CallingConv::GHC || CC == CallingConv::HiPE)
|
||||
return CSR_NoRegs_RegMask;
|
||||
if (CC == CallingConv::WebKit_JS || CC == CallingConv::AnyReg)
|
||||
return CSR_MostRegs_64_RegMask;
|
||||
if (CC == CallingConv::AnyReg)
|
||||
return CSR_AllRegs_64_RegMask;
|
||||
if (!Is64Bit)
|
||||
return CSR_32_RegMask;
|
||||
if (CC == CallingConv::Cold)
|
||||
|
Loading…
x
Reference in New Issue
Block a user