llvm-6502/lib/Target/MSP430/MSP430RegisterInfo.cpp
Anton Korobeynikov dcb802cf7b Provide set of reserved registers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70704 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-03 13:00:11 +00:00

88 lines
2.5 KiB
C++

//===- MSP430RegisterInfo.cpp - MSP430 Register Information ---------------===//
//
// 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 TargetRegisterInfo class.
//
//===----------------------------------------------------------------------===//
#define DEBUG_TYPE "msp430-reg-info"
#include "MSP430.h"
#include "MSP430RegisterInfo.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/ADT/BitVector.h"
using namespace llvm;
// FIXME: Provide proper call frame setup / destroy opcodes.
MSP430RegisterInfo::MSP430RegisterInfo(const TargetInstrInfo &tii)
: MSP430GenRegisterInfo(MSP430::NOP, MSP430::NOP),
TII(tii) {}
const unsigned*
MSP430RegisterInfo::getCalleeSavedRegs(const MachineFunction *MF) const {
assert(0 && "Not implemented yet!");
}
const TargetRegisterClass* const*
MSP430RegisterInfo::getCalleeSavedRegClasses(const MachineFunction *MF) const {
assert(0 && "Not implemented yet!");
}
BitVector
MSP430RegisterInfo::getReservedRegs(const MachineFunction &MF) const {
BitVector Reserved(getNumRegs());
// Mark 4 special registers as reserved.
Reserved.set(MSP430::PC);
Reserved.set(MSP430::SP);
Reserved.set(MSP430::SR);
Reserved.set(MSP430::CG);
// Mark frame pointer as reserved if needed.
if (hasFP(MF))
Reserved.set(MSP430::FP);
return Reserved;
}
bool MSP430RegisterInfo::hasFP(const MachineFunction &MF) const {
assert(0 && "Not implemented yet!");
}
void
MSP430RegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator II,
int SPAdj, RegScavenger *RS) const {
assert(0 && "Not implemented yet!");
}
void MSP430RegisterInfo::emitPrologue(MachineFunction &MF) const {
assert(0 && "Not implemented yet!");
}
void MSP430RegisterInfo::emitEpilogue(MachineFunction &MF,
MachineBasicBlock &MBB) const {
assert(0 && "Not implemented yet!");
}
unsigned MSP430RegisterInfo::getRARegister() const {
assert(0 && "Not implemented yet!");
}
unsigned MSP430RegisterInfo::getFrameRegister(MachineFunction &MF) const {
assert(0 && "Not implemented yet!");
}
int MSP430RegisterInfo::getDwarfRegNum(unsigned RegNum, bool isEH) const {
assert(0 && "Not implemented yet!");
}
#include "MSP430GenRegisterInfo.inc"