Use %ull here.
[llvm/stm8.git] / lib / Target / XCore / XCoreRegisterInfo.h
blob770483b68615805d15698b95e7d39c82471ae8e4
1 //===- XCoreRegisterInfo.h - XCore Register Information Impl ----*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file contains the XCore implementation of the MRegisterInfo class.
12 //===----------------------------------------------------------------------===//
14 #ifndef XCOREREGISTERINFO_H
15 #define XCOREREGISTERINFO_H
17 #include "llvm/Target/TargetRegisterInfo.h"
18 #include "XCoreGenRegisterInfo.h.inc"
20 namespace llvm {
22 class TargetInstrInfo;
24 struct XCoreRegisterInfo : public XCoreGenRegisterInfo {
25 private:
26 const TargetInstrInfo &TII;
28 void loadConstant(MachineBasicBlock &MBB,
29 MachineBasicBlock::iterator I,
30 unsigned DstReg, int64_t Value, DebugLoc dl) const;
32 void storeToStack(MachineBasicBlock &MBB,
33 MachineBasicBlock::iterator I,
34 unsigned SrcReg, int Offset, DebugLoc dl) const;
36 void loadFromStack(MachineBasicBlock &MBB,
37 MachineBasicBlock::iterator I,
38 unsigned DstReg, int Offset, DebugLoc dl) const;
40 public:
41 XCoreRegisterInfo(const TargetInstrInfo &tii);
43 /// Code Generation virtual methods...
45 const unsigned *getCalleeSavedRegs(const MachineFunction *MF = 0) const;
47 BitVector getReservedRegs(const MachineFunction &MF) const;
49 bool requiresRegisterScavenging(const MachineFunction &MF) const;
51 bool useFPForScavengingIndex(const MachineFunction &MF) const;
53 void eliminateCallFramePseudoInstr(MachineFunction &MF,
54 MachineBasicBlock &MBB,
55 MachineBasicBlock::iterator I) const;
57 void eliminateFrameIndex(MachineBasicBlock::iterator II,
58 int SPAdj, RegScavenger *RS = NULL) const;
60 // Debug information queries.
61 unsigned getRARegister() const;
62 unsigned getFrameRegister(const MachineFunction &MF) const;
64 //! Return the array of argument passing registers
65 /*!
66 \note The size of this array is returned by getArgRegsSize().
68 static const unsigned *getArgRegs(const MachineFunction *MF = 0);
70 //! Return the size of the argument passing register array
71 static unsigned getNumArgRegs(const MachineFunction *MF = 0);
73 //! Return whether to emit frame moves
74 static bool needsFrameMoves(const MachineFunction &MF);
76 //! Get DWARF debugging register number
77 int getDwarfRegNum(unsigned RegNum, bool isEH) const;
80 } // end namespace llvm
82 #endif