Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(204)

Side by Side Diff: lib/Target/PowerPC/PPCFrameLowering.cpp

Issue 183273009: Prep for merging 3.4: Undo changes from 3.3 branch (Closed) Base URL: http://git.chromium.org/native_client/pnacl-llvm.git@master
Patch Set: Retry Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lib/Target/PowerPC/PPCBranchSelector.cpp ('k') | lib/Target/PowerPC/PPCInstrInfo.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===-- PPCFrameLowering.cpp - PPC Frame Information ----------------------===// 1 //===-- PPCFrameLowering.cpp - PPC Frame Information ----------------------===//
2 // 2 //
3 // The LLVM Compiler Infrastructure 3 // The LLVM Compiler Infrastructure
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 // 9 //
10 // This file contains the PPC implementation of TargetFrameLowering class. 10 // This file contains the PPC implementation of TargetFrameLowering class.
(...skipping 1152 matching lines...) Expand 10 before | Expand all | Expand 10 after
1163 } 1163 }
1164 1164
1165 // Insert the spill to the stack frame. 1165 // Insert the spill to the stack frame.
1166 if (IsCRField) { 1166 if (IsCRField) {
1167 PPCFunctionInfo *FuncInfo = MF->getInfo<PPCFunctionInfo>(); 1167 PPCFunctionInfo *FuncInfo = MF->getInfo<PPCFunctionInfo>();
1168 if (Subtarget.isPPC64()) { 1168 if (Subtarget.isPPC64()) {
1169 // The actual spill will happen at the start of the prologue. 1169 // The actual spill will happen at the start of the prologue.
1170 FuncInfo->addMustSaveCR(Reg); 1170 FuncInfo->addMustSaveCR(Reg);
1171 } else { 1171 } else {
1172 CRSpilled = true; 1172 CRSpilled = true;
1173 FuncInfo->setSpillsCR();
1174 1173
1175 // 32-bit: FP-relative. Note that we made sure CR2-CR4 all have 1174 // 32-bit: FP-relative. Note that we made sure CR2-CR4 all have
1176 // the same frame index in PPCRegisterInfo::hasReservedSpillSlot. 1175 // the same frame index in PPCRegisterInfo::hasReservedSpillSlot.
1177 CRMIB = BuildMI(*MF, DL, TII.get(PPC::MFCR), PPC::R12) 1176 CRMIB = BuildMI(*MF, DL, TII.get(PPC::MFCR), PPC::R12)
1178 .addReg(Reg, RegState::ImplicitKill); 1177 .addReg(Reg, RegState::ImplicitKill);
1179 1178
1180 MBB.insert(MI, CRMIB); 1179 MBB.insert(MI, CRMIB);
1181 MBB.insert(MI, addFrameReference(BuildMI(*MF, DL, TII.get(PPC::STW)) 1180 MBB.insert(MI, addFrameReference(BuildMI(*MF, DL, TII.get(PPC::STW))
1182 .addReg(PPC::R12, 1181 .addReg(PPC::R12,
1183 getKillRegState(true)), 1182 getKillRegState(true)),
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
1344 // If we haven't yet spilled the CRs, do so now. 1343 // If we haven't yet spilled the CRs, do so now.
1345 if (CR2Spilled || CR3Spilled || CR4Spilled) { 1344 if (CR2Spilled || CR3Spilled || CR4Spilled) {
1346 bool is31 = needsFP(*MF); 1345 bool is31 = needsFP(*MF);
1347 restoreCRs(Subtarget.isPPC64(), is31, CR2Spilled, CR3Spilled, CR4Spilled, 1346 restoreCRs(Subtarget.isPPC64(), is31, CR2Spilled, CR3Spilled, CR4Spilled,
1348 MBB, I, CSI, CSIIndex); 1347 MBB, I, CSI, CSIIndex);
1349 } 1348 }
1350 1349
1351 return true; 1350 return true;
1352 } 1351 }
1353 1352
OLDNEW
« no previous file with comments | « lib/Target/PowerPC/PPCBranchSelector.cpp ('k') | lib/Target/PowerPC/PPCInstrInfo.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698