diff options
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r-- | llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp | 8 | ||||
-rw-r--r-- | llvm/lib/Target/TargetAsmInfo.cpp | 1 | ||||
-rw-r--r-- | llvm/lib/Target/X86/X86TargetAsmInfo.cpp | 7 | ||||
-rw-r--r-- | llvm/lib/Target/X86/X86TargetAsmInfo.h | 2 |
4 files changed, 17 insertions, 1 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp b/llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp index 6045cfa161d..7912f705738 100644 --- a/llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp +++ b/llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp @@ -16,6 +16,12 @@ #include "llvm/Function.h" using namespace llvm; +// ASM variant to use. +enum { + PPC_OLD_MNEMONICS = 0, + PPC_NEW_MNEMONICS = 1 +}; + PPCTargetAsmInfo::PPCTargetAsmInfo(const PPCTargetMachine &TM) { bool isPPC64 = TM.getSubtargetImpl()->isPPC64(); @@ -26,6 +32,7 @@ PPCTargetAsmInfo::PPCTargetAsmInfo(const PPCTargetMachine &TM) { LCOMMDirective = "\t.lcomm\t"; InlineAsmStart = "# InlineAsm Start"; InlineAsmEnd = "# InlineAsm End"; + AssemblerDialect = PPC_OLD_MNEMONICS; NeedsSet = true; AddressSize = isPPC64 ? 8 : 4; @@ -56,6 +63,7 @@ DarwinTargetAsmInfo::DarwinTargetAsmInfo(const PPCTargetMachine &TM) UsedDirective = "\t.no_dead_strip\t"; WeakRefDirective = "\t.weak_reference\t"; HiddenDirective = "\t.private_extern\t"; + AssemblerDialect = PPC_NEW_MNEMONICS; } LinuxTargetAsmInfo::LinuxTargetAsmInfo(const PPCTargetMachine &TM) diff --git a/llvm/lib/Target/TargetAsmInfo.cpp b/llvm/lib/Target/TargetAsmInfo.cpp index c2f3e034363..b1845007440 100644 --- a/llvm/lib/Target/TargetAsmInfo.cpp +++ b/llvm/lib/Target/TargetAsmInfo.cpp @@ -32,6 +32,7 @@ TargetAsmInfo::TargetAsmInfo() : FunctionAddrSuffix(""), InlineAsmStart("#APP"), InlineAsmEnd("#NO_APP"), + AssemblerDialect(0), ZeroDirective("\t.zero\t"), ZeroDirectiveSuffix(0), AsciiDirective("\t.ascii\t"), diff --git a/llvm/lib/Target/X86/X86TargetAsmInfo.cpp b/llvm/lib/Target/X86/X86TargetAsmInfo.cpp index 5f156451818..021976eea76 100644 --- a/llvm/lib/Target/X86/X86TargetAsmInfo.cpp +++ b/llvm/lib/Target/X86/X86TargetAsmInfo.cpp @@ -21,6 +21,12 @@ #include "llvm/ADT/StringExtras.h" using namespace llvm; +// ASM variant to use. +enum { + X86_ATT = 0, + X86_INTEL = 1 +}; + static const char* x86_asm_table[] = {"{si}", "S", "{di}", "D", "{ax}", "a", @@ -38,6 +44,7 @@ X86TargetAsmInfo::X86TargetAsmInfo(const X86TargetMachine &TM) { // FIXME - Should be simplified. AsmTransCBE = x86_asm_table; + AssemblerDialect = X86_ATT; switch (Subtarget->TargetType) { case X86Subtarget::isDarwin: diff --git a/llvm/lib/Target/X86/X86TargetAsmInfo.h b/llvm/lib/Target/X86/X86TargetAsmInfo.h index 0f698590ae7..cc509d18537 100644 --- a/llvm/lib/Target/X86/X86TargetAsmInfo.h +++ b/llvm/lib/Target/X86/X86TargetAsmInfo.h @@ -17,7 +17,7 @@ #include "llvm/Target/TargetAsmInfo.h" namespace llvm { - + // Forward declaration. class X86TargetMachine; |