mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-12 13:38:21 +00:00
Sparc: Implement emitFrameIndexDebugValue and getDebugValue Location hooks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147269 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -62,6 +62,8 @@ namespace {
|
|||||||
|
|
||||||
virtual bool isBlockOnlyReachableByFallthrough(const MachineBasicBlock *MBB)
|
virtual bool isBlockOnlyReachableByFallthrough(const MachineBasicBlock *MBB)
|
||||||
const;
|
const;
|
||||||
|
|
||||||
|
virtual MachineLocation getDebugValueLocation(const MachineInstr *MI) const;
|
||||||
};
|
};
|
||||||
} // end of anonymous namespace
|
} // end of anonymous namespace
|
||||||
|
|
||||||
@ -241,7 +243,14 @@ isBlockOnlyReachableByFallthrough(const MachineBasicBlock *MBB) const {
|
|||||||
return I == Pred->end() || !I->isBarrier();
|
return I == Pred->end() || !I->isBarrier();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MachineLocation SparcAsmPrinter::
|
||||||
|
getDebugValueLocation(const MachineInstr *MI) const {
|
||||||
|
assert(MI->getNumOperands() == 4 && "Invalid number of operands!");
|
||||||
|
assert(MI->getOperand(0).isReg() && MI->getOperand(1).isImm() &&
|
||||||
|
"Unexpected MachineOperand types");
|
||||||
|
return MachineLocation(MI->getOperand(0).getReg(),
|
||||||
|
MI->getOperand(1).getImm());
|
||||||
|
}
|
||||||
|
|
||||||
// Force static initialization.
|
// Force static initialization.
|
||||||
extern "C" void LLVMInitializeSparcAsmPrinter() {
|
extern "C" void LLVMInitializeSparcAsmPrinter() {
|
||||||
|
@ -112,6 +112,17 @@ static SPCC::CondCodes GetOppositeBranchCondition(SPCC::CondCodes CC)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MachineInstr *
|
||||||
|
SparcInstrInfo::emitFrameIndexDebugValue(MachineFunction &MF,
|
||||||
|
int FrameIx,
|
||||||
|
uint64_t Offset,
|
||||||
|
const MDNode *MDPtr,
|
||||||
|
DebugLoc dl) const {
|
||||||
|
MachineInstrBuilder MIB = BuildMI(MF, dl, get(SP::DBG_VALUE))
|
||||||
|
.addFrameIndex(FrameIx).addImm(0).addImm(Offset).addMetadata(MDPtr);
|
||||||
|
return &*MIB;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool SparcInstrInfo::AnalyzeBranch(MachineBasicBlock &MBB,
|
bool SparcInstrInfo::AnalyzeBranch(MachineBasicBlock &MBB,
|
||||||
MachineBasicBlock *&TBB,
|
MachineBasicBlock *&TBB,
|
||||||
|
@ -62,6 +62,13 @@ public:
|
|||||||
virtual unsigned isStoreToStackSlot(const MachineInstr *MI,
|
virtual unsigned isStoreToStackSlot(const MachineInstr *MI,
|
||||||
int &FrameIndex) const;
|
int &FrameIndex) const;
|
||||||
|
|
||||||
|
/// emitFrameIndexDebugValue - Emit a target-dependent form of
|
||||||
|
/// DBG_VALUE encoding the address of a frame index.
|
||||||
|
virtual MachineInstr *emitFrameIndexDebugValue(MachineFunction &MF,
|
||||||
|
int FrameIx,
|
||||||
|
uint64_t Offset,
|
||||||
|
const MDNode *MDPtr,
|
||||||
|
DebugLoc dl) const;
|
||||||
|
|
||||||
virtual bool AnalyzeBranch(MachineBasicBlock &MBB, MachineBasicBlock *&TBB,
|
virtual bool AnalyzeBranch(MachineBasicBlock &MBB, MachineBasicBlock *&TBB,
|
||||||
MachineBasicBlock *&FBB,
|
MachineBasicBlock *&FBB,
|
||||||
|
Reference in New Issue
Block a user