forked from OSchip/llvm-project
None of these targets actually define their own CFI_INSTRUCTION
opcode so there's no reason to use the target namespace for it rather than TargetOpcode. llvm-svn: 207475
This commit is contained in:
parent
40af450562
commit
612bb69bf7
|
@ -563,13 +563,14 @@ void PPCFrameLowering::emitPrologue(MachineFunction &MF) const {
|
|||
assert(NegFrameSize);
|
||||
unsigned CFIIndex = MMI.addFrameInst(
|
||||
MCCFIInstruction::createDefCfaOffset(nullptr, NegFrameSize));
|
||||
BuildMI(MBB, MBBI, dl, TII.get(PPC::CFI_INSTRUCTION)).addCFIIndex(CFIIndex);
|
||||
BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION))
|
||||
.addCFIIndex(CFIIndex);
|
||||
|
||||
if (HasFP) {
|
||||
unsigned Reg = MRI->getDwarfRegNum(FPReg, true);
|
||||
CFIIndex = MMI.addFrameInst(
|
||||
MCCFIInstruction::createOffset(nullptr, Reg, FPOffset));
|
||||
BuildMI(MBB, MBBI, dl, TII.get(PPC::CFI_INSTRUCTION))
|
||||
BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION))
|
||||
.addCFIIndex(CFIIndex);
|
||||
}
|
||||
|
||||
|
@ -577,7 +578,7 @@ void PPCFrameLowering::emitPrologue(MachineFunction &MF) const {
|
|||
unsigned Reg = MRI->getDwarfRegNum(BPReg, true);
|
||||
CFIIndex = MMI.addFrameInst(
|
||||
MCCFIInstruction::createOffset(nullptr, Reg, BPOffset));
|
||||
BuildMI(MBB, MBBI, dl, TII.get(PPC::CFI_INSTRUCTION))
|
||||
BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION))
|
||||
.addCFIIndex(CFIIndex);
|
||||
}
|
||||
|
||||
|
@ -585,7 +586,7 @@ void PPCFrameLowering::emitPrologue(MachineFunction &MF) const {
|
|||
unsigned Reg = MRI->getDwarfRegNum(LRReg, true);
|
||||
CFIIndex = MMI.addFrameInst(
|
||||
MCCFIInstruction::createOffset(nullptr, Reg, LROffset));
|
||||
BuildMI(MBB, MBBI, dl, TII.get(PPC::CFI_INSTRUCTION))
|
||||
BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION))
|
||||
.addCFIIndex(CFIIndex);
|
||||
}
|
||||
}
|
||||
|
@ -602,7 +603,7 @@ void PPCFrameLowering::emitPrologue(MachineFunction &MF) const {
|
|||
unsigned CFIIndex = MMI.addFrameInst(
|
||||
MCCFIInstruction::createDefCfaRegister(nullptr, Reg));
|
||||
|
||||
BuildMI(MBB, MBBI, dl, TII.get(PPC::CFI_INSTRUCTION))
|
||||
BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION))
|
||||
.addCFIIndex(CFIIndex);
|
||||
}
|
||||
}
|
||||
|
@ -630,7 +631,7 @@ void PPCFrameLowering::emitPrologue(MachineFunction &MF) const {
|
|||
if (isSVR4ABI && isPPC64 && (PPC::CR2 <= Reg && Reg <= PPC::CR4)) {
|
||||
unsigned CFIIndex = MMI.addFrameInst(MCCFIInstruction::createOffset(
|
||||
nullptr, MRI->getDwarfRegNum(PPC::CR2, true), 8));
|
||||
BuildMI(MBB, MBBI, dl, TII.get(PPC::CFI_INSTRUCTION))
|
||||
BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION))
|
||||
.addCFIIndex(CFIIndex);
|
||||
continue;
|
||||
}
|
||||
|
@ -638,7 +639,7 @@ void PPCFrameLowering::emitPrologue(MachineFunction &MF) const {
|
|||
int Offset = MFI->getObjectOffset(CSI[I].getFrameIdx());
|
||||
unsigned CFIIndex = MMI.addFrameInst(MCCFIInstruction::createOffset(
|
||||
nullptr, MRI->getDwarfRegNum(Reg, true), Offset));
|
||||
BuildMI(MBB, MBBI, dl, TII.get(PPC::CFI_INSTRUCTION))
|
||||
BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION))
|
||||
.addCFIIndex(CFIIndex);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -109,18 +109,21 @@ void SparcFrameLowering::emitPrologue(MachineFunction &MF) const {
|
|||
// Emit ".cfi_def_cfa_register 30".
|
||||
unsigned CFIIndex =
|
||||
MMI.addFrameInst(MCCFIInstruction::createDefCfaRegister(nullptr, regFP));
|
||||
BuildMI(MBB, MBBI, dl, TII.get(SP::CFI_INSTRUCTION)).addCFIIndex(CFIIndex);
|
||||
BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION))
|
||||
.addCFIIndex(CFIIndex);
|
||||
|
||||
// Emit ".cfi_window_save".
|
||||
CFIIndex = MMI.addFrameInst(MCCFIInstruction::createWindowSave(nullptr));
|
||||
BuildMI(MBB, MBBI, dl, TII.get(SP::CFI_INSTRUCTION)).addCFIIndex(CFIIndex);
|
||||
BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION))
|
||||
.addCFIIndex(CFIIndex);
|
||||
|
||||
unsigned regInRA = MRI->getDwarfRegNum(SP::I7, true);
|
||||
unsigned regOutRA = MRI->getDwarfRegNum(SP::O7, true);
|
||||
// Emit ".cfi_register 15, 31".
|
||||
CFIIndex = MMI.addFrameInst(
|
||||
MCCFIInstruction::createRegister(nullptr, regOutRA, regInRA));
|
||||
BuildMI(MBB, MBBI, dl, TII.get(SP::CFI_INSTRUCTION)).addCFIIndex(CFIIndex);
|
||||
BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION))
|
||||
.addCFIIndex(CFIIndex);
|
||||
}
|
||||
|
||||
void SparcFrameLowering::
|
||||
|
|
|
@ -369,7 +369,8 @@ void X86FrameLowering::emitCalleeSavedFrameMoves(
|
|||
unsigned CFIIndex =
|
||||
MMI.addFrameInst(MCCFIInstruction::createOffset(nullptr, DwarfReg,
|
||||
Offset));
|
||||
BuildMI(MBB, MBBI, DL, TII.get(X86::CFI_INSTRUCTION)).addCFIIndex(CFIIndex);
|
||||
BuildMI(MBB, MBBI, DL, TII.get(TargetOpcode::CFI_INSTRUCTION))
|
||||
.addCFIIndex(CFIIndex);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -514,7 +515,7 @@ void X86FrameLowering::emitPrologue(MachineFunction &MF) const {
|
|||
assert(StackSize);
|
||||
unsigned CFIIndex = MMI.addFrameInst(
|
||||
MCCFIInstruction::createDefCfaOffset(nullptr, 2 * stackGrowth));
|
||||
BuildMI(MBB, MBBI, DL, TII.get(X86::CFI_INSTRUCTION))
|
||||
BuildMI(MBB, MBBI, DL, TII.get(TargetOpcode::CFI_INSTRUCTION))
|
||||
.addCFIIndex(CFIIndex);
|
||||
|
||||
// Change the rule for the FramePtr to be an "offset" rule.
|
||||
|
@ -522,7 +523,7 @@ void X86FrameLowering::emitPrologue(MachineFunction &MF) const {
|
|||
CFIIndex = MMI.addFrameInst(
|
||||
MCCFIInstruction::createOffset(nullptr,
|
||||
DwarfFramePtr, 2 * stackGrowth));
|
||||
BuildMI(MBB, MBBI, DL, TII.get(X86::CFI_INSTRUCTION))
|
||||
BuildMI(MBB, MBBI, DL, TII.get(TargetOpcode::CFI_INSTRUCTION))
|
||||
.addCFIIndex(CFIIndex);
|
||||
}
|
||||
|
||||
|
@ -538,7 +539,7 @@ void X86FrameLowering::emitPrologue(MachineFunction &MF) const {
|
|||
unsigned DwarfFramePtr = RegInfo->getDwarfRegNum(FramePtr, true);
|
||||
unsigned CFIIndex = MMI.addFrameInst(
|
||||
MCCFIInstruction::createDefCfaRegister(nullptr, DwarfFramePtr));
|
||||
BuildMI(MBB, MBBI, DL, TII.get(X86::CFI_INSTRUCTION))
|
||||
BuildMI(MBB, MBBI, DL, TII.get(TargetOpcode::CFI_INSTRUCTION))
|
||||
.addCFIIndex(CFIIndex);
|
||||
}
|
||||
|
||||
|
@ -567,7 +568,7 @@ void X86FrameLowering::emitPrologue(MachineFunction &MF) const {
|
|||
assert(StackSize);
|
||||
unsigned CFIIndex = MMI.addFrameInst(
|
||||
MCCFIInstruction::createDefCfaOffset(nullptr, StackOffset));
|
||||
BuildMI(MBB, MBBI, DL, TII.get(X86::CFI_INSTRUCTION))
|
||||
BuildMI(MBB, MBBI, DL, TII.get(TargetOpcode::CFI_INSTRUCTION))
|
||||
.addCFIIndex(CFIIndex);
|
||||
StackOffset += stackGrowth;
|
||||
}
|
||||
|
@ -704,7 +705,7 @@ void X86FrameLowering::emitPrologue(MachineFunction &MF) const {
|
|||
MCCFIInstruction::createDefCfaOffset(nullptr,
|
||||
-StackSize + stackGrowth));
|
||||
|
||||
BuildMI(MBB, MBBI, DL, TII.get(X86::CFI_INSTRUCTION))
|
||||
BuildMI(MBB, MBBI, DL, TII.get(TargetOpcode::CFI_INSTRUCTION))
|
||||
.addCFIIndex(CFIIndex);
|
||||
}
|
||||
|
||||
|
|
|
@ -64,7 +64,8 @@ static void EmitDefCfaRegister(MachineBasicBlock &MBB,
|
|||
MachineModuleInfo *MMI, unsigned DRegNum) {
|
||||
unsigned CFIIndex = MMI->addFrameInst(
|
||||
MCCFIInstruction::createDefCfaRegister(nullptr, DRegNum));
|
||||
BuildMI(MBB, MBBI, dl, TII.get(XCore::CFI_INSTRUCTION)).addCFIIndex(CFIIndex);
|
||||
BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION))
|
||||
.addCFIIndex(CFIIndex);
|
||||
}
|
||||
|
||||
static void EmitDefCfaOffset(MachineBasicBlock &MBB,
|
||||
|
@ -73,7 +74,8 @@ static void EmitDefCfaOffset(MachineBasicBlock &MBB,
|
|||
MachineModuleInfo *MMI, int Offset) {
|
||||
unsigned CFIIndex =
|
||||
MMI->addFrameInst(MCCFIInstruction::createDefCfaOffset(nullptr, -Offset));
|
||||
BuildMI(MBB, MBBI, dl, TII.get(XCore::CFI_INSTRUCTION)).addCFIIndex(CFIIndex);
|
||||
BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION))
|
||||
.addCFIIndex(CFIIndex);
|
||||
}
|
||||
|
||||
static void EmitCfiOffset(MachineBasicBlock &MBB,
|
||||
|
@ -82,7 +84,8 @@ static void EmitCfiOffset(MachineBasicBlock &MBB,
|
|||
unsigned DRegNum, int Offset) {
|
||||
unsigned CFIIndex = MMI->addFrameInst(
|
||||
MCCFIInstruction::createOffset(nullptr, DRegNum, Offset));
|
||||
BuildMI(MBB, MBBI, dl, TII.get(XCore::CFI_INSTRUCTION)).addCFIIndex(CFIIndex);
|
||||
BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION))
|
||||
.addCFIIndex(CFIIndex);
|
||||
}
|
||||
|
||||
/// The SP register is moved in steps of 'MaxImmU16' towards the bottom of the
|
||||
|
|
Loading…
Reference in New Issue