summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PIC16/PIC16AsmPrinter.cpp
diff options
context:
space:
mode:
authorSanjiv Gupta <sanjiv.gupta@microchip.com>2009-04-06 10:54:50 +0000
committerSanjiv Gupta <sanjiv.gupta@microchip.com>2009-04-06 10:54:50 +0000
commit0b08df8c0944cbfd3681ac7bb1d389a2d4362f75 (patch)
tree9a8510bb19296f27cb68b0e362c9d05f3329b1c6 /llvm/lib/Target/PIC16/PIC16AsmPrinter.cpp
parent56382aa890f9abc917feb5e5f2f26ef5af43ff07 (diff)
downloadbcm5719-llvm-0b08df8c0944cbfd3681ac7bb1d389a2d4362f75.tar.gz
bcm5719-llvm-0b08df8c0944cbfd3681ac7bb1d389a2d4362f75.zip
Map stack based frameindices for spills to zero based indices that can be accessed based on an external symbol defining the location of temporary data for a function. For example: we have spill slots addressed as foo.tmp + 0, foo.tmp + 1 etc.
llvm-svn: 68442
Diffstat (limited to 'llvm/lib/Target/PIC16/PIC16AsmPrinter.cpp')
-rw-r--r--llvm/lib/Target/PIC16/PIC16AsmPrinter.cpp15
1 files changed, 3 insertions, 12 deletions
diff --git a/llvm/lib/Target/PIC16/PIC16AsmPrinter.cpp b/llvm/lib/Target/PIC16/PIC16AsmPrinter.cpp
index b4950436ced..c0b1f6e8607 100644
--- a/llvm/lib/Target/PIC16/PIC16AsmPrinter.cpp
+++ b/llvm/lib/Target/PIC16/PIC16AsmPrinter.cpp
@@ -343,7 +343,6 @@ bool PIC16AsmPrinter::doFinalization(Module &M) {
void PIC16AsmPrinter::emitFunctionData(MachineFunction &MF) {
const Function *F = MF.getFunction();
std::string FuncName = Mang->getValueName(F);
- MachineFrameInfo *MFI= MF.getFrameInfo();
Module *M = const_cast<Module *>(F->getParent());
const TargetData *TD = TM.getTargetData();
unsigned FrameSize = 0;
@@ -406,15 +405,7 @@ void PIC16AsmPrinter::emitFunctionData(MachineFunction &MF) {
O << VarName << " RES " << Size << "\n";
}
-
- // Emit the variable to hold the space for temporary locations
- // in function frame.
- if (MFI->hasStackObjects()) {
- int indexBegin = MFI->getObjectIndexBegin();
- int indexEnd = MFI->getObjectIndexEnd();
- if (indexBegin < indexEnd) {
- int TempSize = indexEnd - indexBegin;
- O << CurrentFnName << ".tmp RES " << TempSize <<"\n";
- }
- }
+ int TempSize = PTLI->GetTmpSize();
+ if (TempSize > 0 )
+ O << CurrentFnName << ".tmp RES " << TempSize <<"\n";
}
OpenPOWER on IntegriCloud