Lines Matching refs:MBlaze
1 //===-- MBlazeFrameLowering.cpp - MBlaze Frame Information ---------------====//
10 // This file contains the MBlaze implementation of TargetFrameLowering class.
14 #define DEBUG_TYPE "mblaze-frame-lowering"
36 "disable-mblaze-stack-adjust",
38 cl::desc("Disable MBlaze stack layout adjustment."),
122 if (I->getOpcode() != MBlaze::LWI || I->getNumOperands() != 3 ||
131 SI->getOpcode() != MBlaze::SWI) continue;
175 if (I->getOpcode() != MBlaze::SWI || I->getNumOperands() != 3 ||
186 case MBlaze::R5: FILoc = -4; break;
187 case MBlaze::R6: FILoc = -8; break;
188 case MBlaze::R7: FILoc = -12; break;
189 case MBlaze::R8: FILoc = -16; break;
190 case MBlaze::R9: FILoc = -20; break;
191 case MBlaze::R10: FILoc = -24; break;
249 for (unsigned r = MBlaze::R3; r <= MBlaze::R12; ++r) {
250 if (!MRI.isPhysRegUsed(r) && !(isIntr && r == MBlaze::R11)) continue;
255 BuildMI(MENT, MENTI, ENTDL, TII.get(MBlaze::SWI), r)
263 BuildMI(MENT, MENTI, ENTDL, TII.get(MBlaze::SWI), MBlaze::R17)
266 BuildMI(MENT, MENTI, ENTDL, TII.get(MBlaze::SWI), MBlaze::R18)
272 BuildMI(MENT, MENTI, ENTDL, TII.get(MBlaze::MFS), MBlaze::R11)
273 .addReg(MBlaze::RMSR);
274 BuildMI(MENT, MENTI, ENTDL, TII.get(MBlaze::SWI), MBlaze::R11)
277 BuildMI(MEXT, MEXTI, EXTDL, TII.get(MBlaze::LWI), MBlaze::R11)
279 BuildMI(MEXT, MEXTI, EXTDL, TII.get(MBlaze::MTS), MBlaze::RMSR)
280 .addReg(MBlaze::R11);
284 BuildMI(MEXT, MEXTI, EXTDL, TII.get(MBlaze::LWI), MBlaze::R18)
287 BuildMI(MEXT, MEXTI, EXTDL, TII.get(MBlaze::LWI), MBlaze::R17)
291 for (unsigned r = MBlaze::R12, i = VFI.size(); r >= MBlaze::R3; --r) {
293 BuildMI(MEXT, MEXTI, EXTDL, TII.get(MBlaze::LWI), r)
366 BuildMI(MBB, MBBI, DL, TII.get(MBlaze::ADDIK), MBlaze::R1)
367 .addReg(MBlaze::R1).addImm(-StackSize);
371 BuildMI(MBB, MBBI, DL, TII.get(MBlaze::SWI))
372 .addReg(MBlaze::R15).addReg(MBlaze::R1).addImm(RAOffset);
377 BuildMI(MBB, MBBI, DL, TII.get(MBlaze::SWI))
378 .addReg(MBlaze::R19).addReg(MBlaze::R1).addImm(FPOffset);
381 BuildMI(MBB, MBBI, DL, TII.get(MBlaze::ADD), MBlaze::R19)
382 .addReg(MBlaze::R1).addReg(MBlaze::R0);
405 BuildMI(MBB, MBBI, dl, TII.get(MBlaze::ADD), MBlaze::R1)
406 .addReg(MBlaze::R19).addReg(MBlaze::R0);
409 BuildMI(MBB, MBBI, dl, TII.get(MBlaze::LWI), MBlaze::R19)
410 .addReg(MBlaze::R1).addImm(FPOffset);
415 BuildMI(MBB, MBBI, dl, TII.get(MBlaze::LWI), MBlaze::R15)
416 .addReg(MBlaze::R1).addImm(RAOffset);
424 BuildMI(MBB, MBBI, dl, TII.get(MBlaze::ADDIK), MBlaze::R1)
425 .addReg(MBlaze::R1).addImm(StackSize);
449 if (Old->getOpcode() == MBlaze::ADJCALLSTACKDOWN) {
450 New = BuildMI(MF,Old->getDebugLoc(), TII.get(MBlaze::ADDIK),MBlaze::R1)
451 .addReg(MBlaze::R1).addImm(-Amount);
453 assert(Old->getOpcode() == MBlaze::ADJCALLSTACKUP);
454 New = BuildMI(MF,Old->getDebugLoc(), TII.get(MBlaze::ADDIK),MBlaze::R1)
455 .addReg(MBlaze::R1).addImm(Amount);