2009-05-03 12:57:15 +00:00
|
|
|
//===- MSP430RegisterInfo.h - MSP430 Register Information Impl --*- C++ -*-===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This file contains the MSP430 implementation of the MRegisterInfo class.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef LLVM_TARGET_MSP430REGISTERINFO_H
|
|
|
|
#define LLVM_TARGET_MSP430REGISTERINFO_H
|
|
|
|
|
|
|
|
#include "llvm/Target/TargetRegisterInfo.h"
|
|
|
|
#include "MSP430GenRegisterInfo.h.inc"
|
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
|
|
|
|
class TargetInstrInfo;
|
2009-05-03 13:07:54 +00:00
|
|
|
class MSP430TargetMachine;
|
2009-05-03 12:57:15 +00:00
|
|
|
|
|
|
|
struct MSP430RegisterInfo : public MSP430GenRegisterInfo {
|
|
|
|
private:
|
2009-05-03 13:07:54 +00:00
|
|
|
MSP430TargetMachine &TM;
|
2009-05-03 12:57:15 +00:00
|
|
|
const TargetInstrInfo &TII;
|
2009-05-03 13:07:54 +00:00
|
|
|
|
|
|
|
/// StackAlign - Default stack alignment.
|
|
|
|
///
|
|
|
|
unsigned StackAlign;
|
2009-05-03 12:57:15 +00:00
|
|
|
public:
|
2009-05-03 13:07:54 +00:00
|
|
|
MSP430RegisterInfo(MSP430TargetMachine &tm, const TargetInstrInfo &tii);
|
2009-05-03 12:57:15 +00:00
|
|
|
|
|
|
|
/// Code Generation virtual methods...
|
|
|
|
const unsigned *getCalleeSavedRegs(const MachineFunction *MF = 0) const;
|
|
|
|
|
|
|
|
BitVector getReservedRegs(const MachineFunction &MF) const;
|
2009-07-29 20:31:52 +00:00
|
|
|
const TargetRegisterClass* getPointerRegClass(unsigned Kind = 0) const;
|
2009-05-03 12:57:15 +00:00
|
|
|
|
2011-05-04 01:01:36 +00:00
|
|
|
const TargetRegisterClass *
|
|
|
|
getMatchingSuperRegClass(const TargetRegisterClass *A,
|
|
|
|
const TargetRegisterClass *B, unsigned Idx) const {
|
|
|
|
// No sub-classes makes this really easy.
|
|
|
|
return A;
|
|
|
|
}
|
|
|
|
|
2009-05-03 13:07:54 +00:00
|
|
|
void eliminateCallFramePseudoInstr(MachineFunction &MF,
|
|
|
|
MachineBasicBlock &MBB,
|
|
|
|
MachineBasicBlock::iterator I) const;
|
2009-05-03 12:57:15 +00:00
|
|
|
|
2010-08-26 23:32:16 +00:00
|
|
|
void eliminateFrameIndex(MachineBasicBlock::iterator II,
|
|
|
|
int SPAdj, RegScavenger *RS = NULL) const;
|
2009-05-03 12:57:15 +00:00
|
|
|
|
2009-05-03 13:11:20 +00:00
|
|
|
void processFunctionBeforeFrameFinalized(MachineFunction &MF) const;
|
|
|
|
|
2009-05-03 12:57:15 +00:00
|
|
|
// Debug information queries.
|
|
|
|
unsigned getRARegister() const;
|
2009-11-12 21:00:03 +00:00
|
|
|
unsigned getFrameRegister(const MachineFunction &MF) const;
|
2009-05-03 12:57:15 +00:00
|
|
|
|
|
|
|
//! Get DWARF debugging register number
|
|
|
|
int getDwarfRegNum(unsigned RegNum, bool isEH) const;
|
2011-05-30 20:20:15 +00:00
|
|
|
int getLLVMRegNum(unsigned RegNum, bool isEH) const;
|
2009-05-03 12:57:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // end namespace llvm
|
|
|
|
|
|
|
|
#endif // LLVM_TARGET_MSP430REGISTERINFO_H
|