1 //===-- AVRRegisterInfo.h - AVR 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 AVR implementation of the TargetRegisterInfo class.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_AVR_REGISTER_INFO_H
15 #define LLVM_AVR_REGISTER_INFO_H
17 #include "llvm/Target/TargetRegisterInfo.h"
19 #define GET_REGINFO_HEADER
20 #include "AVRGenRegisterInfo.inc"
24 /// Utilities relating to AVR registers.
25 class AVRRegisterInfo : public AVRGenRegisterInfo {
31 getCalleeSavedRegs(const MachineFunction *MF = 0) const override;
32 const uint32_t *getCallPreservedMask(const MachineFunction &MF,
33 CallingConv::ID CC) const override;
34 BitVector getReservedRegs(const MachineFunction &MF) const override;
36 const TargetRegisterClass *
37 getLargestLegalSuperClass(const TargetRegisterClass *RC,
38 const MachineFunction &MF) const override;
40 /// Stack Frame Processing Methods
41 void eliminateFrameIndex(MachineBasicBlock::iterator MI, int SPAdj,
42 unsigned FIOperandNum,
43 RegScavenger *RS = NULL) const override;
45 unsigned getFrameRegister(const MachineFunction &MF) const override;
47 const TargetRegisterClass *
48 getPointerRegClass(const MachineFunction &MF,
49 unsigned Kind = 0) const override;
51 /// Splits a 16-bit `DREGS` register into the lo/hi register pair.
52 /// \param Reg A 16-bit register to split.
53 void splitReg(unsigned Reg, unsigned &LoReg, unsigned &HiReg) const;
56 } // end namespace llvm
58 #endif // LLVM_AVR_REGISTER_INFO_H