Setting GlobalDirective in TargetAsmInfo by default rather than
[oota-llvm.git] / lib / Target / Mips / MipsTargetAsmInfo.cpp
1 //===-- MipsTargetAsmInfo.cpp - Mips asm properties -------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file was developed by Bruno Cardoso Lopes and is distributed under the
6 // University of Illinois Open Source License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file contains the declarations of the MipsTargetAsmInfo properties.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #include "MipsTargetAsmInfo.h"
15 #include "MipsTargetMachine.h"
16
17 using namespace llvm;
18
19 MipsTargetAsmInfo::MipsTargetAsmInfo(const MipsTargetMachine &TM) {
20   AlignmentIsInBytes   = false;
21   Data16bitsDirective  = "\t.half\t";
22   Data32bitsDirective  = "\t.word\t";
23   PrivateGlobalPrefix  = "$";
24   JumpTableDataSection = "\t.rdata";
25   CommentString        = "#";
26   ReadOnlySection      = "\t.rdata";
27   ZeroDirective        = "\t.space\t";
28   BSSSection           = "\t.section\t.bss";
29   LCOMMDirective       = "\t.lcomm\t";
30
31   if (TM.getRelocationModel() == Reloc::Static)
32     JumpTableDirective = "\t.word\t";
33   else    
34     JumpTableDirective = "\t.gpword\t";
35
36   COMMDirectiveTakesAlignment = true;
37 }