summaryrefslogtreecommitdiff
path: root/lib/Target/PowerPC
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-08-13 17:03:38 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-08-13 17:03:38 +0000
commitb42dad4761968b4b052e72494ce1bf0c7b3aba3e (patch)
tree11e926d193167408fab59f934d902a343d3171d5 /lib/Target/PowerPC
parentf35d21617e9c6616eb127355b7c7cd3a5aa7cc58 (diff)
downloadllvm-b42dad4761968b4b052e72494ce1bf0c7b3aba3e.tar.gz
llvm-b42dad4761968b4b052e72494ce1bf0c7b3aba3e.tar.bz2
llvm-b42dad4761968b4b052e72494ce1bf0c7b3aba3e.tar.xz
Revert 78892 and 78895, these break generating working executables on
x86_64-apple-darwin10. --- Reverse-merging r78895 into '.': U test/CodeGen/PowerPC/2008-12-12-EH.ll U lib/Target/DarwinTargetAsmInfo.cpp --- Reverse-merging r78892 into '.': U include/llvm/Target/DarwinTargetAsmInfo.h U lib/Target/X86/X86TargetAsmInfo.cpp U lib/Target/X86/X86TargetAsmInfo.h U lib/Target/ARM/ARMTargetAsmInfo.h U lib/Target/ARM/ARMTargetMachine.cpp U lib/Target/ARM/ARMTargetAsmInfo.cpp U lib/Target/PowerPC/PPCTargetAsmInfo.cpp U lib/Target/PowerPC/PPCTargetAsmInfo.h U lib/Target/PowerPC/PPCTargetMachine.cpp G lib/Target/DarwinTargetAsmInfo.cpp git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78919 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC')
-rw-r--r--lib/Target/PowerPC/PPCTargetAsmInfo.cpp14
-rw-r--r--lib/Target/PowerPC/PPCTargetAsmInfo.h5
-rw-r--r--lib/Target/PowerPC/PPCTargetMachine.cpp5
3 files changed, 11 insertions, 13 deletions
diff --git a/lib/Target/PowerPC/PPCTargetAsmInfo.cpp b/lib/Target/PowerPC/PPCTargetAsmInfo.cpp
index 25920da0fe..36cf2a5570 100644
--- a/lib/Target/PowerPC/PPCTargetAsmInfo.cpp
+++ b/lib/Target/PowerPC/PPCTargetAsmInfo.cpp
@@ -12,21 +12,19 @@
//===----------------------------------------------------------------------===//
#include "PPCTargetAsmInfo.h"
-#include "llvm/ADT/Triple.h"
using namespace llvm;
-PPCDarwinTargetAsmInfo::PPCDarwinTargetAsmInfo(const Triple &TheTriple)
- : DarwinTargetAsmInfo(TheTriple) {
+PPCDarwinTargetAsmInfo::PPCDarwinTargetAsmInfo(bool is64Bit) {
PCSymbol = ".";
CommentString = ";";
ExceptionsType = ExceptionHandling::Dwarf;
- if (TheTriple.getArch() != Triple::ppc64)
+ if (!is64Bit)
Data64bitsDirective = 0; // We can't emit a 64-bit unit in PPC32 mode.
AssemblerDialect = 1; // New-Style mnemonics.
}
-PPCLinuxTargetAsmInfo::PPCLinuxTargetAsmInfo(const Triple &TheTriple) {
+PPCLinuxTargetAsmInfo::PPCLinuxTargetAsmInfo(bool is64Bit) {
CommentString = "#";
GlobalPrefix = "";
PrivateGlobalPrefix = ".L";
@@ -43,15 +41,13 @@ PPCLinuxTargetAsmInfo::PPCLinuxTargetAsmInfo(const Triple &TheTriple) {
HasLEB128 = true; // Target asm supports leb128 directives (little-endian)
// Exceptions handling
- if (TheTriple.getArch() != Triple::ppc64) {
+ if (!is64Bit)
ExceptionsType = ExceptionHandling::Dwarf;
- Data64bitsDirective = 0;
- }
AbsoluteEHSectionOffsets = false;
ZeroDirective = "\t.space\t";
SetDirective = "\t.set";
-
+ Data64bitsDirective = is64Bit ? "\t.quad\t" : 0;
AlignmentIsInBytes = false;
LCOMMDirective = "\t.lcomm\t";
AssemblerDialect = 0; // Old-Style mnemonics.
diff --git a/lib/Target/PowerPC/PPCTargetAsmInfo.h b/lib/Target/PowerPC/PPCTargetAsmInfo.h
index 1e7e3d3745..c7f8862e7f 100644
--- a/lib/Target/PowerPC/PPCTargetAsmInfo.h
+++ b/lib/Target/PowerPC/PPCTargetAsmInfo.h
@@ -14,16 +14,17 @@
#ifndef PPCTARGETASMINFO_H
#define PPCTARGETASMINFO_H
+#include "llvm/Target/TargetAsmInfo.h"
#include "llvm/Target/DarwinTargetAsmInfo.h"
namespace llvm {
struct PPCDarwinTargetAsmInfo : public DarwinTargetAsmInfo {
- explicit PPCDarwinTargetAsmInfo(const Triple &TheTriple);
+ explicit PPCDarwinTargetAsmInfo(bool is64Bit);
};
struct PPCLinuxTargetAsmInfo : public TargetAsmInfo {
- explicit PPCLinuxTargetAsmInfo(const Triple &TheTriple);
+ explicit PPCLinuxTargetAsmInfo(bool is64Bit);
};
} // namespace llvm
diff --git a/lib/Target/PowerPC/PPCTargetMachine.cpp b/lib/Target/PowerPC/PPCTargetMachine.cpp
index a0d4fdb776..41f4699fc0 100644
--- a/lib/Target/PowerPC/PPCTargetMachine.cpp
+++ b/lib/Target/PowerPC/PPCTargetMachine.cpp
@@ -23,9 +23,10 @@ using namespace llvm;
static const TargetAsmInfo *createTargetAsmInfo(const Target &T,
const StringRef &TT) {
Triple TheTriple(TT);
+ bool isPPC64 = TheTriple.getArch() == Triple::ppc64;
if (TheTriple.getOS() == Triple::Darwin)
- return new PPCDarwinTargetAsmInfo(TheTriple);
- return new PPCLinuxTargetAsmInfo(TheTriple);
+ return new PPCDarwinTargetAsmInfo(isPPC64);
+ return new PPCLinuxTargetAsmInfo(isPPC64);
}