diff options
| author | Bill Wendling <isanbard@gmail.com> | 2007-01-16 03:42:04 +0000 |
|---|---|---|
| committer | Bill Wendling <isanbard@gmail.com> | 2007-01-16 03:42:04 +0000 |
| commit | e21237e59a8e172e4b038c4998411538853d6bc5 (patch) | |
| tree | fa586421039cdf5148e9fac1d09ef7d5cdfa8363 /llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp | |
| parent | 4268fc08d383522016587b05f2809e422da58472 (diff) | |
| download | bcm5719-llvm-e21237e59a8e172e4b038c4998411538853d6bc5.tar.gz bcm5719-llvm-e21237e59a8e172e4b038c4998411538853d6bc5.zip | |
Fix for PR1095:
LLVM would miscompile ASM dialects when compiling for PPC. Added dialects for
the X86 and PPC backends. It defaults to "0", the first variant of a compound
inline asm expression.
llvm-svn: 33246
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp')
| -rw-r--r-- | llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp | 8 |
1 files changed, 8 insertions, 0 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) |

