]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCAsmInfo.cpp
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / contrib / llvm / lib / Target / Mips / MCTargetDesc / MipsMCAsmInfo.cpp
1 //===-- MipsMCAsmInfo.cpp - Mips Asm Properties ---------------------------===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file contains the declarations of the MipsMCAsmInfo properties.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #include "MipsMCAsmInfo.h"
15 #include "llvm/ADT/Triple.h"
16
17 using namespace llvm;
18
19 void MipsMCAsmInfo::anchor() { }
20
21 MipsMCAsmInfo::MipsMCAsmInfo(const Target &T, StringRef TT) {
22   Triple TheTriple(TT);
23   if ((TheTriple.getArch() == Triple::mips) ||
24       (TheTriple.getArch() == Triple::mips64))
25     IsLittleEndian = false;
26
27   if ((TheTriple.getArch() == Triple::mips64el) ||
28       (TheTriple.getArch() == Triple::mips64)) {
29     PointerSize = CalleeSaveStackSlotSize = 8;
30   }
31
32   AlignmentIsInBytes          = false;
33   Data16bitsDirective         = "\t.2byte\t";
34   Data32bitsDirective         = "\t.4byte\t";
35   Data64bitsDirective         = "\t.8byte\t";
36   PrivateGlobalPrefix         = "$";
37   CommentString               = "#";
38   ZeroDirective               = "\t.space\t";
39   GPRel32Directive            = "\t.gpword\t";
40   GPRel64Directive            = "\t.gpdword\t";
41   WeakRefDirective            = "\t.weak\t";
42   DebugLabelSuffix            = "=.";
43   SupportsDebugInformation = true;
44   ExceptionsType = ExceptionHandling::DwarfCFI;
45   HasLEB128 = true;
46   DwarfRegNumForCFI = true;
47 }