diff options
| author | Nicolas Geoffray <nicolas.geoffray@lip6.fr> | 2007-12-21 12:19:44 +0000 |
|---|---|---|
| committer | Nicolas Geoffray <nicolas.geoffray@lip6.fr> | 2007-12-21 12:19:44 +0000 |
| commit | 80c741e16030558570c7d19233b68f367d22d0af (patch) | |
| tree | f478a74ed9e4bd8ed515cac663872f4b422db18b /llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp | |
| parent | 78c460c8c485a9b1ae08c1f7f07a5f303c8711da (diff) | |
| download | bcm5719-llvm-80c741e16030558570c7d19233b68f367d22d0af.tar.gz bcm5719-llvm-80c741e16030558570c7d19233b68f367d22d0af.zip | |
Enable EH for linux/ppc32 targets
llvm-svn: 45281
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp')
| -rw-r--r-- | llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp b/llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp index 4a374133c1a..f90c0f78ee9 100644 --- a/llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp +++ b/llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp @@ -28,10 +28,6 @@ PPCTargetAsmInfo::PPCTargetAsmInfo(const PPCTargetMachine &TM) { InlineAsmEnd = "# InlineAsm End"; AssemblerDialect = TM.getSubtargetImpl()->getAsmFlavor(); - NeedsSet = true; - DwarfEHFrameSection = - ".section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support"; - DwarfExceptionSection = ".section __DATA,__gcc_except_tab"; } DarwinTargetAsmInfo::DarwinTargetAsmInfo(const PPCTargetMachine &TM) @@ -60,7 +56,12 @@ DarwinTargetAsmInfo::DarwinTargetAsmInfo(const PPCTargetMachine &TM) HiddenDirective = "\t.private_extern\t"; SupportsExceptionHandling = true; NeedsIndirectEncoding = true; + NeedsSet = true; BSSSection = 0; + + DwarfEHFrameSection = + ".section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support"; + DwarfExceptionSection = ".section __DATA,__gcc_except_tab"; DwarfAbbrevSection = ".section __DWARF,__debug_abbrev,regular,debug"; DwarfInfoSection = ".section __DWARF,__debug_info,regular,debug"; @@ -98,6 +99,9 @@ LinuxTargetAsmInfo::LinuxTargetAsmInfo(const PPCTargetMachine &TM) WeakRefDirective = "\t.weak\t"; BSSSection = "\t.section\t\".sbss\",\"aw\",@nobits"; + // Debug Information + AbsoluteDebugSectionOffsets = true; + SupportsDebugInformation = true; DwarfAbbrevSection = "\t.section\t.debug_abbrev,\"\",@progbits"; DwarfInfoSection = "\t.section\t.debug_info,\"\",@progbits"; DwarfLineSection = "\t.section\t.debug_line,\"\",@progbits"; @@ -109,4 +113,20 @@ LinuxTargetAsmInfo::LinuxTargetAsmInfo(const PPCTargetMachine &TM) DwarfARangesSection = "\t.section\t.debug_aranges,\"\",@progbits"; DwarfRangesSection = "\t.section\t.debug_ranges,\"\",@progbits"; DwarfMacInfoSection = "\t.section\t.debug_macinfo,\"\",@progbits"; + + ReadOnlySection = "\t.section\t.rodata"; + FourByteConstantSection = "\t.section\t.rodata.cst4,\"aM\",@progbits,4"; + EightByteConstantSection = "\t.section\t.rodata.cst8,\"aM\",@progbits,8"; + SixteenByteConstantSection = "\t.section\t.rodata.cst16,\"aM\",@progbits,16"; + PCSymbol = "."; + + // Set up DWARF directives + HasLEB128 = true; // Target asm supports leb128 directives (little-endian) + + // Exceptions handling + if (!TM.getSubtargetImpl()->isPPC64()) + SupportsExceptionHandling = true; + AbsoluteEHSectionOffsets = false; + DwarfEHFrameSection = "\t.section\t.eh_frame,\"aw\",@progbits"; + DwarfExceptionSection = "\t.section\t.gcc_except_table,\"a\",@progbits"; } |

