summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2007-01-16 03:42:04 +0000
committerBill Wendling <isanbard@gmail.com>2007-01-16 03:42:04 +0000
commite21237e59a8e172e4b038c4998411538853d6bc5 (patch)
treefa586421039cdf5148e9fac1d09ef7d5cdfa8363 /llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp
parent4268fc08d383522016587b05f2809e422da58472 (diff)
downloadbcm5719-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.cpp8
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)
OpenPOWER on IntegriCloud