LLVM  5.0.0
MipsMCAsmInfo.cpp
Go to the documentation of this file.
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 
22  IsLittleEndian = TheTriple.isLittleEndian();
23 
24  if ((TheTriple.getArch() == Triple::mips64el) ||
25  (TheTriple.getArch() == Triple::mips64)) {
27  }
28 
29  // FIXME: This condition isn't quite right but it's the best we can do until
30  // this object can identify the ABI. It will misbehave when using O32
31  // on a mips64*-* triple.
32  if ((TheTriple.getArch() == Triple::mipsel) ||
33  (TheTriple.getArch() == Triple::mips)) {
34  PrivateGlobalPrefix = "$";
35  PrivateLabelPrefix = "$";
36  }
37 
38  AlignmentIsInBytes = false;
39  Data16bitsDirective = "\t.2byte\t";
40  Data32bitsDirective = "\t.4byte\t";
41  Data64bitsDirective = "\t.8byte\t";
42  CommentString = "#";
43  ZeroDirective = "\t.space\t";
44  GPRel32Directive = "\t.gpword\t";
45  GPRel64Directive = "\t.gpdword\t";
46  DTPRel32Directive = "\t.dtprelword\t";
47  DTPRel64Directive = "\t.dtpreldword\t";
48  TPRel32Directive = "\t.tprelword\t";
49  TPRel64Directive = "\t.tpreldword\t";
53  DwarfRegNumForCFI = true;
54  HasMipsExpressions = true;
55 
56  // Enable IAS by default for O32.
57  if (TheTriple.getArch() == Triple::mips ||
58  TheTriple.getArch() == Triple::mipsel)
60 
61  // Enable IAS by default for Debian mips64/mips64el.
62  if (TheTriple.getEnvironment() == Triple::GNUABI64)
64 }
bool UseIntegratedAssembler
Should we use the integrated assembler? The integrated assembler should be enabled by default (by the...
Definition: MCAsmInfo.h:357
StringRef PrivateLabelPrefix
This prefix is used for labels for basic blocks.
Definition: MCAsmInfo.h:123
bool DwarfRegNumForCFI
True if dwarf register numbers are printed instead of symbolic register names in .cfi_* directives.
Definition: MCAsmInfo.h:340
const char * Data64bitsDirective
Definition: MCAsmInfo.h:183
const char * ZeroDirective
This should be set to the directive used to get some number of zero bytes emitted to the current sect...
Definition: MCAsmInfo.h:165
bool IsLittleEndian
True if target is little endian. Default is true.
Definition: MCAsmInfo.h:70
unsigned CalleeSaveStackSlotSize
Size of the stack slot reserved for callee-saved registers, in bytes.
Definition: MCAsmInfo.h:67
bool AlignmentIsInBytes
If this is true (the default) then the asmprinter emits ".align N" directives, where N is the number ...
Definition: MCAsmInfo.h:221
StringRef CommentString
This indicates the comment character used by the assembler.
Definition: MCAsmInfo.h:105
ArchType getArch() const
getArch - Get the parsed architecture type of this triple.
Definition: Triple.h:281
bool HasMipsExpressions
Definition: MCAsmInfo.h:375
const char * GPRel64Directive
If non-null, a directive that is used to emit a word which should be relocated as a 64-bit GP-relativ...
Definition: MCAsmInfo.h:188
const char * TPRel32Directive
Definition: MCAsmInfo.h:200
bool SupportsDebugInformation
True if target supports emission of debugging information.
Definition: MCAsmInfo.h:322
const char * Data16bitsDirective
Definition: MCAsmInfo.h:181
bool UseAssignmentForEHBegin
Definition: MCAsmInfo.h:111
const char * DTPRel64Directive
Definition: MCAsmInfo.h:199
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:44
const char * TPRel64Directive
Definition: MCAsmInfo.h:201
const char * Data32bitsDirective
Definition: MCAsmInfo.h:182
const char * GPRel32Directive
If non-null, a directive that is used to emit a word which should be relocated as a 32-bit GP-relativ...
Definition: MCAsmInfo.h:193
unsigned CodePointerSize
Code pointer size in bytes. Default is 4.
Definition: MCAsmInfo.h:63
bool isLittleEndian() const
Tests whether the target triple is little endian.
Definition: Triple.cpp:1448
ExceptionHandling ExceptionsType
Exception handling format for the target. Defaults to None.
Definition: MCAsmInfo.h:325
EnvironmentType getEnvironment() const
getEnvironment - Get the parsed environment type of this triple.
Definition: Triple.h:299
const char * DTPRel32Directive
If non-null, directives that are used to emit a word/dword which should be relocated as a 32/64-bit D...
Definition: MCAsmInfo.h:198
MipsMCAsmInfo(const Triple &TheTriple)
No exception support.
StringRef PrivateGlobalPrefix
This prefix is used for globals like constant pool entries that are completely private to the ...
Definition: MCAsmInfo.h:119