forked from OSchip/llvm-project
Add source debug information to the Sparc code generator.
llvm-svn: 81215
This commit is contained in:
parent
51ae4a23da
commit
bd1fc36002
|
@ -104,6 +104,8 @@ bool SparcAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
|
||||||
|
|
||||||
O << "\t.type\t" << CurrentFnName << ", #function\n";
|
O << "\t.type\t" << CurrentFnName << ", #function\n";
|
||||||
O << CurrentFnName << ":\n";
|
O << CurrentFnName << ":\n";
|
||||||
|
// Emit pre-function debug information.
|
||||||
|
DW->BeginFunction(&MF);
|
||||||
|
|
||||||
// Number each basic block so that we can consistently refer to them
|
// Number each basic block so that we can consistently refer to them
|
||||||
// in PC-relative references.
|
// in PC-relative references.
|
||||||
|
@ -130,6 +132,9 @@ bool SparcAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Emit post-function debug information.
|
||||||
|
DW->EndFunction(&MF);
|
||||||
|
|
||||||
// We didn't modify anything.
|
// We didn't modify anything.
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,6 +22,9 @@ SparcELFMCAsmInfo::SparcELFMCAsmInfo(const Target &T, const StringRef &TT) {
|
||||||
ZeroDirective = "\t.skip\t";
|
ZeroDirective = "\t.skip\t";
|
||||||
CommentString = "!";
|
CommentString = "!";
|
||||||
COMMDirectiveTakesAlignment = true;
|
COMMDirectiveTakesAlignment = true;
|
||||||
|
HasLEB128 = true;
|
||||||
|
AbsoluteDebugSectionOffsets = true;
|
||||||
|
SupportsDebugInformation = true;
|
||||||
|
|
||||||
SunStyleELFSectionSwitchSyntax = true;
|
SunStyleELFSectionSwitchSyntax = true;
|
||||||
UsesELFSectionDirectiveForBSS = true;
|
UsesELFSectionDirectiveForBSS = true;
|
||||||
|
|
|
@ -169,13 +169,11 @@ void SparcRegisterInfo::emitEpilogue(MachineFunction &MF,
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned SparcRegisterInfo::getRARegister() const {
|
unsigned SparcRegisterInfo::getRARegister() const {
|
||||||
llvm_unreachable("What is the return address register");
|
return SP::I7;
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned SparcRegisterInfo::getFrameRegister(MachineFunction &MF) const {
|
unsigned SparcRegisterInfo::getFrameRegister(MachineFunction &MF) const {
|
||||||
llvm_unreachable("What is the frame register");
|
return SP::I6;
|
||||||
return SP::G1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned SparcRegisterInfo::getEHExceptionRegister() const {
|
unsigned SparcRegisterInfo::getEHExceptionRegister() const {
|
||||||
|
@ -189,8 +187,7 @@ unsigned SparcRegisterInfo::getEHHandlerRegister() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
int SparcRegisterInfo::getDwarfRegNum(unsigned RegNum, bool isEH) const {
|
int SparcRegisterInfo::getDwarfRegNum(unsigned RegNum, bool isEH) const {
|
||||||
llvm_unreachable("What is the dwarf register number");
|
return SparcGenRegisterInfo::getDwarfRegNumFull(RegNum, 0);
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "SparcGenRegisterInfo.inc"
|
#include "SparcGenRegisterInfo.inc"
|
||||||
|
|
Loading…
Reference in New Issue