SystemZRegisterInfo.h revision 276479
1279377Simp//===-- SystemZRegisterInfo.h - SystemZ register information ----*- C++ -*-===// 2279377Simp// 3279377Simp// The LLVM Compiler Infrastructure 4279377Simp// 5279377Simp// This file is distributed under the University of Illinois Open Source 6279377Simp// License. See LICENSE.TXT for details. 7279377Simp// 8279377Simp//===----------------------------------------------------------------------===// 9279377Simp 10279377Simp#ifndef SystemZREGISTERINFO_H 11279377Simp#define SystemZREGISTERINFO_H 12279377Simp 13279377Simp#include "SystemZ.h" 14279377Simp#include "llvm/Target/TargetRegisterInfo.h" 15279377Simp 16279377Simp#define GET_REGINFO_HEADER 17279377Simp#include "SystemZGenRegisterInfo.inc" 18279377Simp 19279377Simpnamespace llvm { 20279377Simp 21279377Simpnamespace SystemZ { 22279377Simp// Return the subreg to use for referring to the even and odd registers 23279377Simp// in a GR128 pair. Is32Bit says whether we want a GR32 or GR64. 24279377Simpinline unsigned even128(bool Is32bit) { 25279377Simp return Is32bit ? subreg_hl32 : subreg_h64; 26279377Simp} 27279377Simpinline unsigned odd128(bool Is32bit) { 28279377Simp return Is32bit ? subreg_l32 : subreg_l64; 29279377Simp} 30279377Simp} // end namespace SystemZ 31279377Simp 32279377Simpstruct SystemZRegisterInfo : public SystemZGenRegisterInfo { 33279377Simppublic: 34279377Simp SystemZRegisterInfo(); 35279377Simp 36279377Simp // Override TargetRegisterInfo.h. 37279377Simp bool requiresRegisterScavenging(const MachineFunction &MF) const override { 38279377Simp return true; 39279377Simp } 40279377Simp bool requiresFrameIndexScavenging(const MachineFunction &MF) const override { 41279377Simp return true; 42279377Simp } 43279377Simp bool trackLivenessAfterRegAlloc(const MachineFunction &MF) const override { 44279377Simp return true; 45279377Simp } 46279377Simp const MCPhysReg *getCalleeSavedRegs(const MachineFunction *MF = nullptr) const 47279377Simp override; 48279377Simp const uint32_t *getCallPreservedMask(CallingConv::ID CC) const override; 49279377Simp BitVector getReservedRegs(const MachineFunction &MF) const override; 50279377Simp void eliminateFrameIndex(MachineBasicBlock::iterator MI, 51279377Simp int SPAdj, unsigned FIOperandNum, 52279377Simp RegScavenger *RS) const override; 53279377Simp unsigned getFrameRegister(const MachineFunction &MF) const override; 54279377Simp}; 55279377Simp 56279377Simp} // end namespace llvm 57279377Simp 58279377Simp#endif 59279377Simp