1 //===- SkeletonRegisterInfo.cpp - Skeleton Register Information -*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file was developed by the LLVM research group and is distributed under
6 // the University of Illinois Open Source License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file contains the Skeleton implementation of the MRegisterInfo class.
12 //===----------------------------------------------------------------------===//
15 #include "SkeletonRegisterInfo.h"
16 #include "llvm/Type.h"
19 SkeletonRegisterInfo::SkeletonRegisterInfo()
20 : SkeletonGenRegisterInfo(Skeleton::ADJCALLSTACKDOWN,
21 Skeleton::ADJCALLSTACKUP) {}
23 void SkeletonRegisterInfo::
24 storeRegToStackSlot(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI,
25 unsigned SrcReg, int FrameIdx) const {
29 void SkeletonRegisterInfo::
30 loadRegFromStackSlot(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI,
31 unsigned DestReg, int FrameIdx) const {
35 void SkeletonRegisterInfo::copyRegToReg(MachineBasicBlock &MBB,
36 MachineBasicBlock::iterator MBBI,
37 unsigned DestReg, unsigned SrcReg,
38 const TargetRegisterClass *RC) const {
42 void SkeletonRegisterInfo::
43 eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB,
44 MachineBasicBlock::iterator I) const {
48 void SkeletonRegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator II)
53 void SkeletonRegisterInfo::
54 processFunctionBeforeFrameFinalized(MachineFunction &MF) const {
58 void SkeletonRegisterInfo::emitPrologue(MachineFunction &MF) const {
62 void SkeletonRegisterInfo::emitEpilogue(MachineFunction &MF,
63 MachineBasicBlock &MBB) const {
68 #include "SkeletonGenRegisterInfo.inc"
70 const TargetRegisterClass*
71 SkeletonRegisterInfo::getRegClassForType(const Type* Ty) const {
72 switch (Ty->getTypeID()) {
74 case Type::ULongTyID: assert(0 && "Long values can't fit in registers!");
75 default: assert(0 && "Invalid type to getClass!");
80 case Type::UShortTyID:
83 case Type::PointerTyID: return &GPRCInstance;
86 case Type::DoubleTyID: return &FPRCInstance;