X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FTarget%2FX86%2FX86MCAsmInfo.cpp;h=1ac2d7e6c6d476189c55acfb08df68349ee148f1;hb=1292c226458b68a119d3a387a0527f453b2065c2;hp=1afabc9d9c15b64cf5b615454cbd5a2033dc1f4c;hpb=bcc5cb406172edcb68598e9578bab9ed9bd0de85;p=oota-llvm.git diff --git a/lib/Target/X86/X86MCAsmInfo.cpp b/lib/Target/X86/X86MCAsmInfo.cpp index 1afabc9d9c1..1ac2d7e6c6d 100644 --- a/lib/Target/X86/X86MCAsmInfo.cpp +++ b/lib/Target/X86/X86MCAsmInfo.cpp @@ -14,6 +14,7 @@ #include "X86MCAsmInfo.h" #include "X86TargetMachine.h" #include "llvm/ADT/Triple.h" +#include "llvm/MC/MCContext.h" #include "llvm/MC/MCSectionELF.h" #include "llvm/Support/CommandLine.h" using namespace llvm; @@ -55,6 +56,10 @@ X86MCAsmInfoDarwin::X86MCAsmInfoDarwin(const Triple &Triple) { if (!is64Bit) Data64bitsDirective = 0; // we can't emit a 64-bit unit + // FIXME: Darwin 10 doesn't need this. + if (is64Bit) + NeedsSetToChangeDiffSize = true; + // Use ## as a comment string so that .s files generated by llvm can go // through the GCC preprocessor without causing an error. This is needed // because "clang foo.s" runs the C preprocessor, which is usually reserved @@ -84,7 +89,6 @@ X86ELFMCAsmInfo::X86ELFMCAsmInfo(const Triple &T) { HasLEB128 = true; // Target asm supports leb128 directives (little-endian) // Debug Information - AbsoluteDebugSectionOffsets = true; SupportsDebugInformation = true; // Exceptions handling @@ -96,12 +100,16 @@ X86ELFMCAsmInfo::X86ELFMCAsmInfo(const Triple &T) { Data64bitsDirective = 0; } -MCSection *X86ELFMCAsmInfo::getNonexecutableStackSection(MCContext &Ctx) const { - return MCSectionELF::Create(".note.GNU-stack", MCSectionELF::SHT_PROGBITS, - 0, SectionKind::getMetadata(), false, Ctx); +const MCSection *X86ELFMCAsmInfo:: +getNonexecutableStackSection(MCContext &Ctx) const { + return Ctx.getELFSection(".note.GNU-stack", MCSectionELF::SHT_PROGBITS, + 0, SectionKind::getMetadata()); } X86MCAsmInfoCOFF::X86MCAsmInfoCOFF(const Triple &Triple) { + if (Triple.getArch() == Triple::x86_64) + GlobalPrefix = ""; + AsmTransCBE = x86_asm_table; AssemblerDialect = AsmWriterFlavor;