mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-23 17:29:19 +00:00
ARM: mark additional instructions as MachineFrameSetup
Mark up additional instructions which are part of the function prologue as MachineFrameSetup. These instructions are part of the function prologue, emitted by the PEI pass to setup the stack for use in the activating frame. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208153 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0029e2d665
commit
3fe09b705c
@ -299,10 +299,12 @@ void ARMFrameLowering::emitPrologue(MachineFunction &MF) const {
|
||||
|
||||
if (NumWords < 65536)
|
||||
AddDefaultPred(BuildMI(MBB, MBBI, dl, TII.get(ARM::t2MOVi16), ARM::R4)
|
||||
.addImm(NumWords));
|
||||
.addImm(NumWords)
|
||||
.setMIFlags(MachineInstr::FrameSetup));
|
||||
else
|
||||
BuildMI(MBB, MBBI, dl, TII.get(ARM::t2MOVi32imm), ARM::R4)
|
||||
.addImm(NumWords);
|
||||
.addImm(NumWords)
|
||||
.setMIFlags(MachineInstr::FrameSetup);
|
||||
|
||||
switch (TM.getCodeModel()) {
|
||||
case CodeModel::Small:
|
||||
@ -312,17 +314,20 @@ void ARMFrameLowering::emitPrologue(MachineFunction &MF) const {
|
||||
BuildMI(MBB, MBBI, dl, TII.get(ARM::tBL))
|
||||
.addImm((unsigned)ARMCC::AL).addReg(0)
|
||||
.addExternalSymbol("__chkstk")
|
||||
.addReg(ARM::R4, RegState::Implicit);
|
||||
.addReg(ARM::R4, RegState::Implicit)
|
||||
.setMIFlags(MachineInstr::FrameSetup);
|
||||
break;
|
||||
case CodeModel::Large:
|
||||
case CodeModel::JITDefault:
|
||||
BuildMI(MBB, MBBI, dl, TII.get(ARM::t2MOVi32imm), ARM::R12)
|
||||
.addExternalSymbol("__chkstk");
|
||||
.addExternalSymbol("__chkstk")
|
||||
.setMIFlags(MachineInstr::FrameSetup);
|
||||
|
||||
BuildMI(MBB, MBBI, dl, TII.get(ARM::tBLXr))
|
||||
.addImm((unsigned)ARMCC::AL).addReg(0)
|
||||
.addReg(ARM::R12, RegState::Kill)
|
||||
.addReg(ARM::R4, RegState::Implicit);
|
||||
.addReg(ARM::R4, RegState::Implicit)
|
||||
.setMIFlags(MachineInstr::FrameSetup);
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user