LLVM  9.0.0svn
Go to the documentation of this file.
1 //===-- MipsMCAsmInfo.cpp - Mips Asm Properties ---------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains the declarations of the MipsMCAsmInfo properties.
10 //
11 //===----------------------------------------------------------------------===//
13 #include "MipsMCAsmInfo.h"
14 #include "llvm/ADT/Triple.h"
16 using namespace llvm;
18 void MipsMCAsmInfo::anchor() { }
21  IsLittleEndian = TheTriple.isLittleEndian();
23  if (TheTriple.isMIPS64() && TheTriple.getEnvironment() != Triple::GNUABIN32)
26  // FIXME: This condition isn't quite right but it's the best we can do until
27  // this object can identify the ABI. It will misbehave when using O32
28  // on a mips64*-* triple.
29  if (TheTriple.isMIPS32()) {
30  PrivateGlobalPrefix = "$";
31  PrivateLabelPrefix = "$";
32  }
34  AlignmentIsInBytes = false;
35  Data16bitsDirective = "\t.2byte\t";
36  Data32bitsDirective = "\t.4byte\t";
37  Data64bitsDirective = "\t.8byte\t";
38  CommentString = "#";
39  ZeroDirective = "\t.space\t";
40  GPRel32Directive = "\t.gpword\t";
41  GPRel64Directive = "\t.gpdword\t";
42  DTPRel32Directive = "\t.dtprelword\t";
43  DTPRel64Directive = "\t.dtpreldword\t";
44  TPRel32Directive = "\t.tprelword\t";
45  TPRel64Directive = "\t.tpreldword\t";
49  DwarfRegNumForCFI = true;
50  HasMipsExpressions = true;
52 }
bool isMIPS64() const
Tests whether the target is MIPS 64-bit (little and big endian).
Definition: Triple.h:700
bool UseIntegratedAssembler
Should we use the integrated assembler? The integrated assembler should be enabled by default (by the...
Definition: MCAsmInfo.h:370
StringRef PrivateLabelPrefix
This prefix is used for labels for basic blocks.
Definition: MCAsmInfo.h:131
bool DwarfRegNumForCFI
True if dwarf register numbers are printed instead of symbolic register names in .cfi_* directives.
Definition: MCAsmInfo.h:349
This class represents lattice values for constants.
Definition: AllocatorList.h:23
const char * Data64bitsDirective
Definition: MCAsmInfo.h:192
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:173
bool IsLittleEndian
True if target is little endian. Default is true.
Definition: MCAsmInfo.h:69
unsigned CalleeSaveStackSlotSize
Size of the stack slot reserved for callee-saved registers, in bytes.
Definition: MCAsmInfo.h:66
bool AlignmentIsInBytes
If this is true (the default) then the asmprinter emits ".align N" directives, where N is the number ...
Definition: MCAsmInfo.h:230
StringRef CommentString
This indicates the comment character used by the assembler.
Definition: MCAsmInfo.h:113
bool HasMipsExpressions
Definition: MCAsmInfo.h:388
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:197
bool isLittleEndian() const
Tests whether the target triple is little endian.
Definition: Triple.cpp:1500
const char * TPRel32Directive
Definition: MCAsmInfo.h:209
bool SupportsDebugInformation
True if target supports emission of debugging information.
Definition: MCAsmInfo.h:331
const char * Data16bitsDirective
Definition: MCAsmInfo.h:190
bool UseAssignmentForEHBegin
Definition: MCAsmInfo.h:119
const char * DTPRel64Directive
Definition: MCAsmInfo.h:208
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:43
const char * TPRel64Directive
Definition: MCAsmInfo.h:210
EnvironmentType getEnvironment() const
getEnvironment - Get the parsed environment type of this triple.
Definition: Triple.h:309
const char * Data32bitsDirective
Definition: MCAsmInfo.h:191
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:202
unsigned CodePointerSize
Code pointer size in bytes. Default is 4.
Definition: MCAsmInfo.h:62
bool isMIPS32() const
Tests whether the target is MIPS 32-bit (little and big endian).
Definition: Triple.h:695
ExceptionHandling ExceptionsType
Exception handling format for the target. Defaults to None.
Definition: MCAsmInfo.h:334
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:207
MipsMCAsmInfo(const Triple &TheTriple)
DWARF-like instruction based exceptions.
StringRef PrivateGlobalPrefix
This prefix is used for globals like constant pool entries that are completely private to the ...
Definition: MCAsmInfo.h:127