diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2018-07-28 10:51:19 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2018-07-28 10:51:19 +0000 |
| commit | eb11fae6d08f479c0799db45860a98af528fa6e7 (patch) | |
| tree | 44d492a50c8c1a7eb8e2d17ea3360ec4d066f042 /lib/Target/SystemZ/SystemZRegisterInfo.cpp | |
| parent | b8a2042aa938069e862750553db0e4d82d25822c (diff) | |
Notes
Diffstat (limited to 'lib/Target/SystemZ/SystemZRegisterInfo.cpp')
| -rw-r--r-- | lib/Target/SystemZ/SystemZRegisterInfo.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/Target/SystemZ/SystemZRegisterInfo.cpp b/lib/Target/SystemZ/SystemZRegisterInfo.cpp index 856505e00a10..76ed6f80ba55 100644 --- a/lib/Target/SystemZ/SystemZRegisterInfo.cpp +++ b/lib/Target/SystemZ/SystemZRegisterInfo.cpp @@ -108,6 +108,10 @@ SystemZRegisterInfo::getRegAllocationHints(unsigned VirtReg, const MCPhysReg * SystemZRegisterInfo::getCalleeSavedRegs(const MachineFunction *MF) const { + const SystemZSubtarget &Subtarget = MF->getSubtarget<SystemZSubtarget>(); + if (MF->getFunction().getCallingConv() == CallingConv::AnyReg) + return Subtarget.hasVector()? CSR_SystemZ_AllRegs_Vector_SaveList + : CSR_SystemZ_AllRegs_SaveList; if (MF->getSubtarget().getTargetLowering()->supportSwiftError() && MF->getFunction().getAttributes().hasAttrSomewhere( Attribute::SwiftError)) @@ -118,6 +122,10 @@ SystemZRegisterInfo::getCalleeSavedRegs(const MachineFunction *MF) const { const uint32_t * SystemZRegisterInfo::getCallPreservedMask(const MachineFunction &MF, CallingConv::ID CC) const { + const SystemZSubtarget &Subtarget = MF.getSubtarget<SystemZSubtarget>(); + if (CC == CallingConv::AnyReg) + return Subtarget.hasVector()? CSR_SystemZ_AllRegs_Vector_RegMask + : CSR_SystemZ_AllRegs_RegMask; if (MF.getSubtarget().getTargetLowering()->supportSwiftError() && MF.getFunction().getAttributes().hasAttrSomewhere( Attribute::SwiftError)) @@ -307,3 +315,11 @@ SystemZRegisterInfo::getFrameRegister(const MachineFunction &MF) const { const SystemZFrameLowering *TFI = getFrameLowering(MF); return TFI->hasFP(MF) ? SystemZ::R11D : SystemZ::R15D; } + +const TargetRegisterClass * +SystemZRegisterInfo::getCrossCopyRegClass(const TargetRegisterClass *RC) const { + if (RC == &SystemZ::CCRRegClass) + return &SystemZ::GR32BitRegClass; + return RC; +} + |
