summaryrefslogtreecommitdiff
path: root/lib/Target/Mips/MipsTargetAsmInfo.cpp
blob: aa7576f3295de6f454189d3e1c2d0c54289f0fd8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//===-- MipsTargetAsmInfo.cpp - Mips asm properties -------------*- C++ -*-===//
//
//                     The LLVM Compiler Infrastructure
//
// This file was developed by Bruno Cardoso Lopes and is distributed under the
// University of Illinois Open Source License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file contains the declarations of the MipsTargetAsmInfo properties.
//
//===----------------------------------------------------------------------===//

#include "MipsTargetAsmInfo.h"
#include "MipsTargetMachine.h"

using namespace llvm;

MipsTargetAsmInfo::MipsTargetAsmInfo(const MipsTargetMachine &TM) {
  AlignmentIsInBytes   = false;
  Data16bitsDirective  = "\t.half\t";
  Data32bitsDirective  = "\t.word\t";
  PrivateGlobalPrefix  = "$";
  JumpTableDataSection = "\t.rdata";
  CommentString        = "#";
  ReadOnlySection      = "\t.rdata";
  ZeroDirective        = "\t.space\t";
  BSSSection           = "\t.section\t.bss";
  LCOMMDirective       = "\t.lcomm\t";

  if (TM.getRelocationModel() == Reloc::Static)
    JumpTableDirective = "\t.word\t";
  else    
    JumpTableDirective = "\t.gpword\t";

  COMMDirectiveTakesAlignment = true;
}