MBlazeRegisterInfo.h [plain text]
#ifndef MBLAZEREGISTERINFO_H
#define MBLAZEREGISTERINFO_H
#include "MBlaze.h"
#include "llvm/Target/TargetRegisterInfo.h"
#include "MBlazeGenRegisterInfo.h.inc"
namespace llvm {
class MBlazeSubtarget;
class TargetInstrInfo;
class Type;
namespace MBlaze {
enum SubregIndex {
SUBREG_FPEVEN = 1, SUBREG_FPODD = 2
};
}
struct MBlazeRegisterInfo : public MBlazeGenRegisterInfo {
const MBlazeSubtarget &Subtarget;
const TargetInstrInfo &TII;
MBlazeRegisterInfo(const MBlazeSubtarget &Subtarget,
const TargetInstrInfo &tii);
static unsigned getRegisterNumbering(unsigned RegEnum);
static unsigned getRegisterFromNumbering(unsigned RegEnum);
static unsigned getPICCallReg();
void adjustMBlazeStackFrame(MachineFunction &MF) const;
const unsigned *getCalleeSavedRegs(const MachineFunction* MF = 0) const;
const TargetRegisterClass* const*
getCalleeSavedRegClasses(const MachineFunction* MF = 0) const;
BitVector getReservedRegs(const MachineFunction &MF) const;
bool hasFP(const MachineFunction &MF) const;
void eliminateCallFramePseudoInstr(MachineFunction &MF,
MachineBasicBlock &MBB,
MachineBasicBlock::iterator I) const;
unsigned eliminateFrameIndex(MachineBasicBlock::iterator II,
int SPAdj, FrameIndexValue *Value = NULL,
RegScavenger *RS = NULL) const;
void processFunctionBeforeFrameFinalized(MachineFunction &MF) const;
void emitPrologue(MachineFunction &MF) const;
void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const;
unsigned getRARegister() const;
unsigned getFrameRegister(const MachineFunction &MF) const;
unsigned getEHExceptionRegister() const;
unsigned getEHHandlerRegister() const;
bool targetHandlesStackFrameRounding() const { return true; }
int getDwarfRegNum(unsigned RegNum, bool isEH) const;
};
}
#endif