[llvm-commits] [llvm] r81215 - in /llvm/trunk/lib/Target/Sparc: AsmPrinter/SparcAsmPrinter.cpp SparcMCAsmInfo.cpp SparcRegisterInfo.cpp
Richard Pennington
rich at pennware.com
Tue Sep 8 05:47:31 PDT 2009
Author: rich
Date: Tue Sep 8 07:47:30 2009
New Revision: 81215
URL: http://llvm.org/viewvc/llvm-project?rev=81215&view=rev
Log:
Add source debug information to the Sparc code generator.
Modified:
llvm/trunk/lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp
llvm/trunk/lib/Target/Sparc/SparcMCAsmInfo.cpp
llvm/trunk/lib/Target/Sparc/SparcRegisterInfo.cpp
Modified: llvm/trunk/lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp?rev=81215&r1=81214&r2=81215&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp Tue Sep 8 07:47:30 2009
@@ -104,6 +104,8 @@
O << "\t.type\t" << CurrentFnName << ", #function\n";
O << CurrentFnName << ":\n";
+ // Emit pre-function debug information.
+ DW->BeginFunction(&MF);
// Number each basic block so that we can consistently refer to them
// in PC-relative references.
@@ -130,6 +132,9 @@
}
}
+ // Emit post-function debug information.
+ DW->EndFunction(&MF);
+
// We didn't modify anything.
return false;
}
Modified: llvm/trunk/lib/Target/Sparc/SparcMCAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/SparcMCAsmInfo.cpp?rev=81215&r1=81214&r2=81215&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Sparc/SparcMCAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/Sparc/SparcMCAsmInfo.cpp Tue Sep 8 07:47:30 2009
@@ -22,6 +22,9 @@
ZeroDirective = "\t.skip\t";
CommentString = "!";
COMMDirectiveTakesAlignment = true;
+ HasLEB128 = true;
+ AbsoluteDebugSectionOffsets = true;
+ SupportsDebugInformation = true;
SunStyleELFSectionSwitchSyntax = true;
UsesELFSectionDirectiveForBSS = true;
Modified: llvm/trunk/lib/Target/Sparc/SparcRegisterInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/SparcRegisterInfo.cpp?rev=81215&r1=81214&r2=81215&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Sparc/SparcRegisterInfo.cpp (original)
+++ llvm/trunk/lib/Target/Sparc/SparcRegisterInfo.cpp Tue Sep 8 07:47:30 2009
@@ -169,13 +169,11 @@
}
unsigned SparcRegisterInfo::getRARegister() const {
- llvm_unreachable("What is the return address register");
- return 0;
+ return SP::I7;
}
unsigned SparcRegisterInfo::getFrameRegister(MachineFunction &MF) const {
- llvm_unreachable("What is the frame register");
- return SP::G1;
+ return SP::I6;
}
unsigned SparcRegisterInfo::getEHExceptionRegister() const {
@@ -189,8 +187,7 @@
}
int SparcRegisterInfo::getDwarfRegNum(unsigned RegNum, bool isEH) const {
- llvm_unreachable("What is the dwarf register number");
- return -1;
+ return SparcGenRegisterInfo::getDwarfRegNumFull(RegNum, 0);
}
#include "SparcGenRegisterInfo.inc"
More information about the llvm-commits
mailing list