LLVM API Documentation
00001 //===-- PPCTargetAsmInfo.cpp - PPC asm properties ---------------*- C++ -*-===// 00002 // 00003 // The LLVM Compiler Infrastructure 00004 // 00005 // This file is distributed under the University of Illinois Open Source 00006 // License. See LICENSE.TXT for details. 00007 // 00008 //===----------------------------------------------------------------------===// 00009 // 00010 // This file contains the declarations of the DarwinTargetAsmInfo properties. 00011 // 00012 //===----------------------------------------------------------------------===// 00013 00014 #include "PPCTargetAsmInfo.h" 00015 using namespace llvm; 00016 00017 PPCDarwinTargetAsmInfo::PPCDarwinTargetAsmInfo(bool is64Bit) { 00018 PCSymbol = "."; 00019 CommentString = ";"; 00020 ExceptionsType = ExceptionHandling::Dwarf; 00021 00022 if (!is64Bit) 00023 Data64bitsDirective = 0; // We can't emit a 64-bit unit in PPC32 mode. 00024 AssemblerDialect = 1; // New-Style mnemonics. 00025 } 00026 00027 PPCLinuxTargetAsmInfo::PPCLinuxTargetAsmInfo(bool is64Bit) { 00028 CommentString = "#"; 00029 GlobalPrefix = ""; 00030 PrivateGlobalPrefix = ".L"; 00031 UsedDirective = "\t# .no_dead_strip\t"; 00032 WeakRefDirective = "\t.weak\t"; 00033 00034 // Uses '.section' before '.bss' directive 00035 UsesELFSectionDirectiveForBSS = true; 00036 00037 // Debug Information 00038 AbsoluteDebugSectionOffsets = true; 00039 SupportsDebugInformation = true; 00040 00041 PCSymbol = "."; 00042 00043 // Set up DWARF directives 00044 HasLEB128 = true; // Target asm supports leb128 directives (little-endian) 00045 00046 // Exceptions handling 00047 if (!is64Bit) 00048 ExceptionsType = ExceptionHandling::Dwarf; 00049 AbsoluteEHSectionOffsets = false; 00050 00051 ZeroDirective = "\t.space\t"; 00052 SetDirective = "\t.set"; 00053 Data64bitsDirective = is64Bit ? "\t.quad\t" : 0; 00054 AlignmentIsInBytes = false; 00055 LCOMMDirective = "\t.lcomm\t"; 00056 AssemblerDialect = 0; // Old-Style mnemonics. 00057 } 00058