mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-25 17:20:48 +00:00
Bug fix: Printing AdIBef and AdIAft outside the scope where they
were declared, and in some cases when they were unintialized. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1146 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1081,6 +1081,7 @@ void UltraSparcRegInfo::insertCallerSavingCode(const MachineInstr *MInst,
|
|||||||
|
|
||||||
|
|
||||||
MachineInstr *AdIBefCC, *AdIAftCC, *AdICpCC;
|
MachineInstr *AdIBefCC, *AdIAftCC, *AdICpCC;
|
||||||
|
MachineInstr *AdIBef, *AdIAft;
|
||||||
|
|
||||||
|
|
||||||
//---- Insert code for pushing the reg on stack ----------
|
//---- Insert code for pushing the reg on stack ----------
|
||||||
@@ -1117,8 +1118,7 @@ void UltraSparcRegInfo::insertCallerSavingCode(const MachineInstr *MInst,
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
// for any other register type, just add the push inst
|
// for any other register type, just add the push inst
|
||||||
MachineInstr *AdIBef =
|
AdIBef = cpReg2MemMI(Reg, getStackPointer(), StackOff, RegType );
|
||||||
cpReg2MemMI(Reg, getStackPointer(), StackOff, RegType );
|
|
||||||
((PRA.AddedInstrMap[MInst])->InstrnsBefore).push_front(AdIBef);
|
((PRA.AddedInstrMap[MInst])->InstrnsBefore).push_front(AdIBef);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1151,11 +1151,8 @@ void UltraSparcRegInfo::insertCallerSavingCode(const MachineInstr *MInst,
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
// for any other register type, just add the pop inst
|
// for any other register type, just add the pop inst
|
||||||
MachineInstr *AdIAft =
|
AdIAft = cpMem2RegMI(getStackPointer(), StackOff, Reg, RegType );
|
||||||
cpMem2RegMI(getStackPointer(), StackOff, Reg, RegType );
|
|
||||||
|
|
||||||
((PRA.AddedInstrMap[MInst])->InstrnsAfter).push_back(AdIAft);
|
((PRA.AddedInstrMap[MInst])->InstrnsAfter).push_back(AdIAft);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PushedRegSet.insert( Reg );
|
PushedRegSet.insert( Reg );
|
||||||
@@ -1163,7 +1160,10 @@ void UltraSparcRegInfo::insertCallerSavingCode(const MachineInstr *MInst,
|
|||||||
if(1) {
|
if(1) {
|
||||||
cerr << "\nFor call inst:" << *MInst;
|
cerr << "\nFor call inst:" << *MInst;
|
||||||
cerr << "\n -inserted caller saving instrs:\n\t ";
|
cerr << "\n -inserted caller saving instrs:\n\t ";
|
||||||
cerr << *AdIBefCC << "\n\t" << *AdIAftCC ;
|
if( RegType == IntCCRegType )
|
||||||
|
cerr << *AdIBefCC << "\n\t" << *AdIAftCC ;
|
||||||
|
else
|
||||||
|
cerr << *AdIBef << "\n\t" << *AdIAft ;
|
||||||
}
|
}
|
||||||
} // if not already pushed
|
} // if not already pushed
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user