1 //===- PIC16RegisterInfo.h - PIC16 Register Information Impl ----*- 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 // This file contains the PIC16 implementation of the TargetRegisterInfo class.
12 //===----------------------------------------------------------------------===//
14 #ifndef PIC16REGISTERINFO_H
15 #define PIC16REGISTERINFO_H
17 #include "PIC16GenRegisterInfo.h.inc"
18 #include "llvm/Target/TargetRegisterInfo.h"
22 // Forward Declarations.
24 class TargetInstrInfo
;
26 class PIC16RegisterInfo
: public PIC16GenRegisterInfo
{
28 const TargetInstrInfo
&TII
;
29 const PIC16Subtarget
&ST
;
32 PIC16RegisterInfo(const TargetInstrInfo
&tii
,
33 const PIC16Subtarget
&st
);
36 //------------------------------------------------------
37 // Pure virtual functions from TargetRegisterInfo
38 //------------------------------------------------------
40 // PIC16 callee saved registers
41 virtual const unsigned*
42 getCalleeSavedRegs(const MachineFunction
*MF
= 0) const;
44 // PIC16 callee saved register classes
45 virtual const TargetRegisterClass
* const *
46 getCalleeSavedRegClasses(const MachineFunction
*MF
) const;
48 virtual BitVector
getReservedRegs(const MachineFunction
&MF
) const;
49 virtual bool hasFP(const MachineFunction
&MF
) const;
51 virtual void eliminateFrameIndex(MachineBasicBlock::iterator MI
,
52 int SPAdj
, RegScavenger
*RS
=NULL
) const;
54 void eliminateCallFramePseudoInstr(MachineFunction
&MF
,
55 MachineBasicBlock
&MBB
,
56 MachineBasicBlock::iterator I
) const;
58 virtual void emitPrologue(MachineFunction
&MF
) const;
59 virtual void emitEpilogue(MachineFunction
&MF
, MachineBasicBlock
&MBB
) const;
60 virtual int getDwarfRegNum(unsigned RegNum
, bool isEH
) const;
61 virtual unsigned getFrameRegister(MachineFunction
&MF
) const;
62 virtual unsigned getRARegister() const;
66 } // end namespace llvm