summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp
diff options
context:
space:
mode:
authorJim Laskey <jlaskey@mac.com>2006-12-21 20:26:09 +0000
committerJim Laskey <jlaskey@mac.com>2006-12-21 20:26:09 +0000
commit28663c73efb52d5b3f9ab097c9753c665e0b69f8 (patch)
tree64ee07f7347a83d3eff6303637ec330b13fd4eaf /llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp
parentba2297ca7ca980a5131812a59c44d30d4efb1da6 (diff)
downloadbcm5719-llvm-28663c73efb52d5b3f9ab097c9753c665e0b69f8.tar.gz
bcm5719-llvm-28663c73efb52d5b3f9ab097c9753c665e0b69f8.zip
Changes from Nick Lewycky with a simplified PPCTargetAsmInfo.
llvm-svn: 32735
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp')
-rw-r--r--llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp43
1 files changed, 31 insertions, 12 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp b/llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp
index 1e380091448..3def0316a7a 100644
--- a/llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp
+++ b/llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp
@@ -16,24 +16,14 @@
#include "llvm/Function.h"
using namespace llvm;
-DarwinTargetAsmInfo::DarwinTargetAsmInfo(const PPCTargetMachine &TM) {
+PPCTargetAsmInfo::PPCTargetAsmInfo(const PPCTargetMachine &TM) {
bool isPPC64 = TM.getSubtargetImpl()->isPPC64();
-
- CommentString = ";";
- GlobalPrefix = "_";
- PrivateGlobalPrefix = "L";
+
ZeroDirective = "\t.space\t";
SetDirective = "\t.set";
Data64bitsDirective = isPPC64 ? "\t.quad\t" : 0;
AlignmentIsInBytes = false;
- ConstantPoolSection = "\t.const\t";
- JumpTableDataSection = ".const";
- CStringSection = "\t.cstring";
LCOMMDirective = "\t.lcomm\t";
- StaticCtorsSection = ".mod_init_func";
- StaticDtorsSection = ".mod_term_func";
- UsedDirective = "\t.no_dead_strip\t";
- WeakRefDirective = "\t.weak_reference\t";
InlineAsmStart = "# InlineAsm Start";
InlineAsmEnd = "# InlineAsm End";
@@ -52,3 +42,32 @@ DarwinTargetAsmInfo::DarwinTargetAsmInfo(const PPCTargetMachine &TM) {
DwarfMacInfoSection = ".section __DWARF,__debug_macinfo,regular,debug";
}
+DarwinTargetAsmInfo::DarwinTargetAsmInfo(const PPCTargetMachine &TM)
+: PPCTargetAsmInfo(TM)
+{
+ CommentString = ";";
+ GlobalPrefix = "_";
+ PrivateGlobalPrefix = "L";
+ ConstantPoolSection = "\t.const\t";
+ JumpTableDataSection = ".const";
+ CStringSection = "\t.cstring";
+ StaticCtorsSection = ".mod_init_func";
+ StaticDtorsSection = ".mod_term_func";
+ UsedDirective = "\t.no_dead_strip\t";
+ WeakRefDirective = "\t.weak_reference\t";
+}
+
+LinuxTargetAsmInfo::LinuxTargetAsmInfo(const PPCTargetMachine &TM)
+: PPCTargetAsmInfo(TM)
+{
+ CommentString = "#";
+ GlobalPrefix = "";
+ PrivateGlobalPrefix = "";
+ ConstantPoolSection = "\t.section .rodata.cst4\t";
+ JumpTableDataSection = ".section .rodata.cst4";
+ CStringSection = "\t.section\t.rodata";
+ StaticCtorsSection = ".section\t.ctors,\"aw\",@progbits";
+ StaticDtorsSection = ".section\t.dtors,\"aw\",@progbits";
+ UsedDirective = "\t# .no_dead_strip\t";
+ WeakRefDirective = "\t.weak\t";
+}
OpenPOWER on IntegriCloud