[llvm] r197316 - [Stackmap] Only the AnyReg calling convention should preserve all registers.
Juergen Ributzka
juergen at apple.com
Fri Dec 13 22:52:59 PST 2013
Author: ributzka
Date: Sat Dec 14 00:52:59 2013
New Revision: 197316
URL: http://llvm.org/viewvc/llvm-project?rev=197316&view=rev
Log:
[Stackmap] Only the AnyReg calling convention should preserve all registers.
Modified:
llvm/trunk/lib/Target/X86/X86CallingConv.td
llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp
Modified: llvm/trunk/lib/Target/X86/X86CallingConv.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86CallingConv.td?rev=197316&r1=197315&r2=197316&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86CallingConv.td (original)
+++ llvm/trunk/lib/Target/X86/X86CallingConv.td Sat Dec 14 00:52:59 2013
@@ -617,6 +617,11 @@ def CSR_MostRegs_64 : CalleeSavedRegs<(a
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,
Modified: llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp?rev=197316&r1=197315&r2=197316&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp Sat Dec 14 00:52:59 2013
@@ -239,10 +239,8 @@ X86RegisterInfo::getCalleeSavedRegs(cons
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(Ca
}
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)
More information about the llvm-commits
mailing list