[llvm-commits] CVS: llvm/lib/Target/ARM/ARMAsmPrinter.cpp ARMISelLowering.cpp ARMRegisterInfo.cpp ARMTargetAsmInfo.cpp
Lauro Ramos Venancio
lauro.venancio at gmail.com
Thu May 3 13:28:53 PDT 2007
Changes in directory llvm/lib/Target/ARM:
ARMAsmPrinter.cpp updated: 1.70 -> 1.71
ARMISelLowering.cpp updated: 1.48 -> 1.49
ARMRegisterInfo.cpp updated: 1.92 -> 1.93
ARMTargetAsmInfo.cpp updated: 1.19 -> 1.20
---
Log message:
Debug support for arm-linux.
Patch by Raul Herbster.
---
Diffs of the changes: (+32 -18)
ARMAsmPrinter.cpp | 25 ++++++++++---------------
ARMISelLowering.cpp | 3 ---
ARMRegisterInfo.cpp | 5 +++++
ARMTargetAsmInfo.cpp | 17 +++++++++++++++++
4 files changed, 32 insertions(+), 18 deletions(-)
Index: llvm/lib/Target/ARM/ARMAsmPrinter.cpp
diff -u llvm/lib/Target/ARM/ARMAsmPrinter.cpp:1.70 llvm/lib/Target/ARM/ARMAsmPrinter.cpp:1.71
--- llvm/lib/Target/ARM/ARMAsmPrinter.cpp:1.70 Thu May 3 11:42:23 2007
+++ llvm/lib/Target/ARM/ARMAsmPrinter.cpp Thu May 3 15:28:35 2007
@@ -175,9 +175,7 @@
bool ARMAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
AFI = MF.getInfo<ARMFunctionInfo>();
- if (Subtarget->isTargetDarwin()) {
- DW.SetModuleInfo(&getAnalysis<MachineModuleInfo>());
- }
+ DW.SetModuleInfo(&getAnalysis<MachineModuleInfo>());
SetupMachineFunction(MF);
O << "\n";
@@ -231,10 +229,8 @@
EmitAlignment(2, F);
O << CurrentFnName << ":\n";
- if (Subtarget->isTargetDarwin()) {
- // Emit pre-function debug information.
- DW.BeginFunction(&MF);
- }
+ // Emit pre-function debug information.
+ DW.BeginFunction(&MF);
// Print out code for the function.
for (MachineFunction::const_iterator I = MF.begin(), E = MF.end();
@@ -254,10 +250,8 @@
if (TAI->hasDotTypeDotSizeDirective())
O << "\t.size " << CurrentFnName << ", .-" << CurrentFnName << "\n";
- if (Subtarget->isTargetDarwin()) {
- // Emit post-function debug information.
- DW.EndFunction();
- }
+ // Emit post-function debug information.
+ DW.EndFunction();
return false;
}
@@ -769,10 +763,8 @@
}
bool ARMAsmPrinter::doInitialization(Module &M) {
- if (Subtarget->isTargetDarwin()) {
- // Emit initial debug information.
- DW.BeginModule(&M);
- }
+ // Emit initial debug information.
+ DW.BeginModule(&M);
return AsmPrinter::doInitialization(M);
}
@@ -998,6 +990,9 @@
// linker can safely perform dead code stripping. Since LLVM never
// generates code that does this, it is always safe to set.
O << "\t.subsections_via_symbols\n";
+ } else {
+ // Emit final debug information for ELF.
+ DW.EndModule();
}
AsmPrinter::doFinalization(M);
Index: llvm/lib/Target/ARM/ARMISelLowering.cpp
diff -u llvm/lib/Target/ARM/ARMISelLowering.cpp:1.48 llvm/lib/Target/ARM/ARMISelLowering.cpp:1.49
--- llvm/lib/Target/ARM/ARMISelLowering.cpp:1.48 Wed May 2 21:00:18 2007
+++ llvm/lib/Target/ARM/ARMISelLowering.cpp Thu May 3 15:28:35 2007
@@ -178,9 +178,6 @@
// Support label based line numbers.
setOperationAction(ISD::LOCATION, MVT::Other, Expand);
setOperationAction(ISD::DEBUG_LOC, MVT::Other, Expand);
- // FIXME - use subtarget debug flags
- if (!Subtarget->isTargetDarwin())
- setOperationAction(ISD::LABEL, MVT::Other, Expand);
setOperationAction(ISD::RET, MVT::Other, Custom);
setOperationAction(ISD::GlobalAddress, MVT::i32, Custom);
Index: llvm/lib/Target/ARM/ARMRegisterInfo.cpp
diff -u llvm/lib/Target/ARM/ARMRegisterInfo.cpp:1.92 llvm/lib/Target/ARM/ARMRegisterInfo.cpp:1.93
--- llvm/lib/Target/ARM/ARMRegisterInfo.cpp:1.92 Tue May 1 04:13:03 2007
+++ llvm/lib/Target/ARM/ARMRegisterInfo.cpp Thu May 3 15:28:35 2007
@@ -1373,6 +1373,11 @@
emitSPUpdate(MBB, MBBI, -NumBytes, isThumb, TII);
}
+ if(STI.isTargetELF() && hasFP(MF)) {
+ MFI->setOffsetAdjustment(MFI->getOffsetAdjustment() -
+ AFI->getFramePtrSpillOffset());
+ }
+
AFI->setGPRCalleeSavedArea1Size(GPRCS1Size);
AFI->setGPRCalleeSavedArea2Size(GPRCS2Size);
AFI->setDPRCalleeSavedAreaSize(DPRCSSize);
Index: llvm/lib/Target/ARM/ARMTargetAsmInfo.cpp
diff -u llvm/lib/Target/ARM/ARMTargetAsmInfo.cpp:1.19 llvm/lib/Target/ARM/ARMTargetAsmInfo.cpp:1.20
--- llvm/lib/Target/ARM/ARMTargetAsmInfo.cpp:1.19 Tue May 1 20:02:40 2007
+++ llvm/lib/Target/ARM/ARMTargetAsmInfo.cpp Thu May 3 15:28:35 2007
@@ -63,8 +63,25 @@
DwarfRangesSection = ".section __DWARF,__debug_ranges,regular,debug";
DwarfMacInfoSection = ".section __DWARF,__debug_macinfo,regular,debug";
} else {
+ NeedsSet = false;
+ HasLEB128 = true;
+ AbsoluteDebugSectionOffsets = true;
+ ReadOnlySection = "\t.section\t.rodata\n";
PrivateGlobalPrefix = ".L";
WeakRefDirective = "\t.weak\t";
+ DwarfRequiresFrameSection = false;
+ DwarfAbbrevSection = "\t.section\t.debug_abbrev,\"\",%progbits";
+ DwarfInfoSection = "\t.section\t.debug_info,\"\",%progbits";
+ DwarfLineSection = "\t.section\t.debug_line,\"\",%progbits";
+ DwarfFrameSection = "\t.section\t.debug_frame,\"\",%progbits";
+ DwarfPubNamesSection ="\t.section\t.debug_pubnames,\"\",%progbits";
+ DwarfPubTypesSection ="\t.section\t.debug_pubtypes,\"\",%progbits";
+ DwarfStrSection = "\t.section\t.debug_str,\"\",%progbits";
+ DwarfLocSection = "\t.section\t.debug_loc,\"\",%progbits";
+ DwarfARangesSection = "\t.section\t.debug_aranges,\"\",%progbits";
+ DwarfRangesSection = "\t.section\t.debug_ranges,\"\",%progbits";
+ DwarfMacInfoSection = "\t.section\t.debug_macinfo,\"\",%progbits";
+
if (Subtarget->isAAPCS_ABI()) {
StaticCtorsSection = "\t.section .init_array,\"aw\",%init_array";
StaticDtorsSection = "\t.section .fini_array,\"aw\",%fini_array";
More information about the llvm-commits
mailing list