Added small section asm emition logic for mips.

Fixed small bug.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53908 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bruno Cardoso Lopes
2008-07-22 15:34:27 +00:00
parent 62d590cc8e
commit feb95cc7e3
3 changed files with 82 additions and 4 deletions

View File

@@ -241,10 +241,11 @@ AddLiveIn(MachineFunction &MF, unsigned PReg, TargetRegisterClass *RC)
bool MipsTargetLowering::IsGlobalInSmallSection(GlobalValue *GV)
{
const TargetData *TD = getTargetData();
const Value *V = dyn_cast<Value>(GV);
const GlobalVariable *GVA = dyn_cast<GlobalVariable>(V);
const GlobalVariable *GVA = dyn_cast<GlobalVariable>(GV);
if (!GVA)
return false;
//const PointerType *PTy = GV->getType();
const Type *Ty = GV->getType()->getElementType();
unsigned Size = TD->getABITypeSize(Ty);