mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-30 02:25:19 +00:00
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:
@@ -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,
|
||||
|
Reference in New Issue
Block a user