forked from OSchip/llvm-project
Enclose directive .cprestore with .set macro and nomacro to silence assembler
warning. llvm-svn: 137378
This commit is contained in:
parent
aee9e76722
commit
79d60d0e94
|
@ -254,9 +254,15 @@ void MipsFrameLowering::emitPrologue(MachineFunction &MF) const {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Restore GP from the saved stack location
|
// Restore GP from the saved stack location
|
||||||
if (MipsFI->needGPSaveRestore())
|
if (MipsFI->needGPSaveRestore()) {
|
||||||
BuildMI(MBB, MBBI, dl, TII.get(Mips::CPRESTORE))
|
unsigned Offset = MFI->getObjectOffset(MipsFI->getGPFI());
|
||||||
.addImm(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,
|
void MipsFrameLowering::emitEpilogue(MachineFunction &MF,
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
; RUN: llc -march=mipsel < %s | FileCheck %s
|
||||||
|
|
||||||
|
; CHECK: .set macro
|
||||||
|
; CHECK-NEXT: .cprestore
|
||||||
|
; CHECK-NEXT: .set nomacro
|
||||||
|
|
||||||
|
%struct.S = type { [16384 x i32] }
|
||||||
|
|
||||||
|
define void @foo2() nounwind {
|
||||||
|
entry:
|
||||||
|
%s = alloca %struct.S, align 4
|
||||||
|
call void @foo1(%struct.S* byval %s)
|
||||||
|
ret void
|
||||||
|
}
|
||||||
|
|
||||||
|
declare void @foo1(%struct.S* byval)
|
Loading…
Reference in New Issue