Enclose directive .cprestore with .set macro and nomacro to silence assembler

warning. 



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137378 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Akira Hatanaka
2011-08-11 22:42:31 +00:00
parent c69c26d95e
commit 9029cf20e1
2 changed files with 25 additions and 3 deletions

View File

@@ -254,9 +254,15 @@ void MipsFrameLowering::emitPrologue(MachineFunction &MF) const {
}
// Restore GP from the saved stack location
if (MipsFI->needGPSaveRestore())
BuildMI(MBB, MBBI, dl, TII.get(Mips::CPRESTORE))
.addImm(MFI->getObjectOffset(MipsFI->getGPFI()));
if (MipsFI->needGPSaveRestore()) {
unsigned Offset = MFI->getObjectOffset(MipsFI->getGPFI());
BuildMI(MBB, MBBI, dl, TII.get(Mips::CPRESTORE)).addImm(Offset);
if (Offset >= 0x8000) {
BuildMI(MBB, llvm::prior(MBBI), dl, TII.get(Mips::MACRO));
BuildMI(MBB, MBBI, dl, TII.get(Mips::NOMACRO));
}
}
}
void MipsFrameLowering::emitEpilogue(MachineFunction &MF,