LLVM API Documentation
00001 //===- SkeletonRegisterInfo.cpp - Skeleton Register Information -*- C++ -*-===// 00002 // 00003 // The LLVM Compiler Infrastructure 00004 // 00005 // This file was developed by the LLVM research group and is distributed under 00006 // the University of Illinois Open Source License. See LICENSE.TXT for details. 00007 // 00008 //===----------------------------------------------------------------------===// 00009 // 00010 // This file contains the Skeleton implementation of the MRegisterInfo class. 00011 // 00012 //===----------------------------------------------------------------------===// 00013 00014 #include "Skeleton.h" 00015 #include "SkeletonRegisterInfo.h" 00016 #include "llvm/Type.h" 00017 using namespace llvm; 00018 00019 SkeletonRegisterInfo::SkeletonRegisterInfo() 00020 : SkeletonGenRegisterInfo(Skeleton::ADJCALLSTACKDOWN, 00021 Skeleton::ADJCALLSTACKUP) {} 00022 00023 void SkeletonRegisterInfo:: 00024 storeRegToStackSlot(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, 00025 unsigned SrcReg, int FrameIdx) const { 00026 abort(); 00027 } 00028 00029 void SkeletonRegisterInfo:: 00030 loadRegFromStackSlot(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, 00031 unsigned DestReg, int FrameIdx) const { 00032 abort(); 00033 } 00034 00035 void SkeletonRegisterInfo::copyRegToReg(MachineBasicBlock &MBB, 00036 MachineBasicBlock::iterator MBBI, 00037 unsigned DestReg, unsigned SrcReg, 00038 const TargetRegisterClass *RC) const { 00039 abort(); 00040 } 00041 00042 void SkeletonRegisterInfo:: 00043 eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB, 00044 MachineBasicBlock::iterator I) const { 00045 abort(); 00046 } 00047 00048 void SkeletonRegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator II) 00049 const { 00050 abort(); 00051 } 00052 00053 void SkeletonRegisterInfo:: 00054 processFunctionBeforeFrameFinalized(MachineFunction &MF) const { 00055 abort(); 00056 } 00057 00058 void SkeletonRegisterInfo::emitPrologue(MachineFunction &MF) const { 00059 abort(); 00060 } 00061 00062 void SkeletonRegisterInfo::emitEpilogue(MachineFunction &MF, 00063 MachineBasicBlock &MBB) const { 00064 abort(); 00065 } 00066 00067 00068 #include "SkeletonGenRegisterInfo.inc" 00069 00070 const TargetRegisterClass* 00071 SkeletonRegisterInfo::getRegClassForType(const Type* Ty) const { 00072 switch (Ty->getTypeID()) { 00073 case Type::LongTyID: 00074 case Type::ULongTyID: assert(0 && "Long values can't fit in registers!"); 00075 default: assert(0 && "Invalid type to getClass!"); 00076 case Type::BoolTyID: 00077 case Type::SByteTyID: 00078 case Type::UByteTyID: 00079 case Type::ShortTyID: 00080 case Type::UShortTyID: 00081 case Type::IntTyID: 00082 case Type::UIntTyID: 00083 case Type::PointerTyID: return &GPRCInstance; 00084 00085 case Type::FloatTyID: 00086 case Type::DoubleTyID: return &FPRCInstance; 00087 } 00088 } 00089