From: Juergen Ributzka Date: Sat, 14 Dec 2013 06:52:59 +0000 (+0000) Subject: [Stackmap] Only the AnyReg calling convention should preserve all registers. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=cdeccb0c224f8c5863ef769c582b2f7c3cbb043c;p=oota-llvm.git [Stackmap] Only the AnyReg calling convention should preserve all registers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197316 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/X86/X86CallingConv.td b/lib/Target/X86/X86CallingConv.td index fdc1140d596..31c62c3f5e2 100644 --- a/lib/Target/X86/X86CallingConv.td +++ b/lib/Target/X86/X86CallingConv.td @@ -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, diff --git a/lib/Target/X86/X86RegisterInfo.cpp b/lib/Target/X86/X86RegisterInfo.cpp index e6cd59397cb..bdaf4ef58fc 100644 --- a/lib/Target/X86/X86RegisterInfo.cpp +++ b/lib/Target/X86/X86RegisterInfo.cpp @@ -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().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)