1 //===-- SystemZRegisterInfo.h - SystemZ register information ----*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef SystemZREGISTERINFO_H
11 #define SystemZREGISTERINFO_H
14 #include "llvm/Target/TargetRegisterInfo.h"
16 #define GET_REGINFO_HEADER
17 #include "SystemZGenRegisterInfo.inc"
22 // Return the subreg to use for referring to the even and odd registers
23 // in a GR128 pair. Is32Bit says whether we want a GR32 or GR64.
24 inline unsigned even128(bool Is32bit) {
25 return Is32bit ? subreg_hl32 : subreg_h64;
27 inline unsigned odd128(bool Is32bit) {
28 return Is32bit ? subreg_l32 : subreg_l64;
30 } // end namespace SystemZ
32 class SystemZSubtarget;
33 class SystemZInstrInfo;
35 struct SystemZRegisterInfo : public SystemZGenRegisterInfo {
37 SystemZTargetMachine &TM;
40 SystemZRegisterInfo(SystemZTargetMachine &tm);
42 // Override TargetRegisterInfo.h.
43 bool requiresRegisterScavenging(const MachineFunction &MF) const override {
46 bool requiresFrameIndexScavenging(const MachineFunction &MF) const override {
49 bool trackLivenessAfterRegAlloc(const MachineFunction &MF) const override {
52 const uint16_t *getCalleeSavedRegs(const MachineFunction *MF = 0) const
54 BitVector getReservedRegs(const MachineFunction &MF) const override;
55 void eliminateFrameIndex(MachineBasicBlock::iterator MI,
56 int SPAdj, unsigned FIOperandNum,
57 RegScavenger *RS) const override;
58 unsigned getFrameRegister(const MachineFunction &MF) const override;
61 } // end namespace llvm