xref: /freebsd/contrib/llvm-project/llvm/lib/Target/MSP430/MSP430RegisterInfo.h (revision 0b57cec536236d46e3dba9bd041533462f33dbb7)
1*0b57cec5SDimitry Andric //===-- MSP430RegisterInfo.h - MSP430 Register Information Impl -*- C++ -*-===//
2*0b57cec5SDimitry Andric //
3*0b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4*0b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
5*0b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6*0b57cec5SDimitry Andric //
7*0b57cec5SDimitry Andric //===----------------------------------------------------------------------===//
8*0b57cec5SDimitry Andric //
9*0b57cec5SDimitry Andric // This file contains the MSP430 implementation of the MRegisterInfo class.
10*0b57cec5SDimitry Andric //
11*0b57cec5SDimitry Andric //===----------------------------------------------------------------------===//
12*0b57cec5SDimitry Andric 
13*0b57cec5SDimitry Andric #ifndef LLVM_LIB_TARGET_MSP430_MSP430REGISTERINFO_H
14*0b57cec5SDimitry Andric #define LLVM_LIB_TARGET_MSP430_MSP430REGISTERINFO_H
15*0b57cec5SDimitry Andric 
16*0b57cec5SDimitry Andric #include "llvm/CodeGen/TargetRegisterInfo.h"
17*0b57cec5SDimitry Andric 
18*0b57cec5SDimitry Andric #define GET_REGINFO_HEADER
19*0b57cec5SDimitry Andric #include "MSP430GenRegisterInfo.inc"
20*0b57cec5SDimitry Andric 
21*0b57cec5SDimitry Andric namespace llvm {
22*0b57cec5SDimitry Andric 
23*0b57cec5SDimitry Andric struct MSP430RegisterInfo : public MSP430GenRegisterInfo {
24*0b57cec5SDimitry Andric public:
25*0b57cec5SDimitry Andric   MSP430RegisterInfo();
26*0b57cec5SDimitry Andric 
27*0b57cec5SDimitry Andric   /// Code Generation virtual methods...
28*0b57cec5SDimitry Andric   const MCPhysReg *getCalleeSavedRegs(const MachineFunction *MF) const override;
29*0b57cec5SDimitry Andric 
30*0b57cec5SDimitry Andric   BitVector getReservedRegs(const MachineFunction &MF) const override;
31*0b57cec5SDimitry Andric   const TargetRegisterClass*
32*0b57cec5SDimitry Andric   getPointerRegClass(const MachineFunction &MF,
33*0b57cec5SDimitry Andric                      unsigned Kind = 0) const override;
34*0b57cec5SDimitry Andric 
35*0b57cec5SDimitry Andric   void eliminateFrameIndex(MachineBasicBlock::iterator II,
36*0b57cec5SDimitry Andric                            int SPAdj, unsigned FIOperandNum,
37*0b57cec5SDimitry Andric                            RegScavenger *RS = nullptr) const override;
38*0b57cec5SDimitry Andric 
39*0b57cec5SDimitry Andric   // Debug information queries.
40*0b57cec5SDimitry Andric   Register getFrameRegister(const MachineFunction &MF) const override;
41*0b57cec5SDimitry Andric };
42*0b57cec5SDimitry Andric 
43*0b57cec5SDimitry Andric } // end namespace llvm
44*0b57cec5SDimitry Andric 
45*0b57cec5SDimitry Andric #endif
46