1 //===-- MipsMCAsmInfo.cpp - Mips Asm Properties ---------------------------===//
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
7 //===----------------------------------------------------------------------===//
9 // This file contains the declarations of the MipsMCAsmInfo properties.
11 //===----------------------------------------------------------------------===//
13 #include "MipsMCAsmInfo.h"
14 #include "llvm/ADT/Triple.h"
18 void MipsMCAsmInfo::anchor() { }
20 MipsMCAsmInfo::MipsMCAsmInfo(const Triple
&TheTriple
) {
21 IsLittleEndian
= TheTriple
.isLittleEndian();
23 if (TheTriple
.isMIPS64() && TheTriple
.getEnvironment() != Triple::GNUABIN32
)
24 CodePointerSize
= CalleeSaveStackSlotSize
= 8;
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
= "$";
34 AlignmentIsInBytes
= false;
35 Data16bitsDirective
= "\t.2byte\t";
36 Data32bitsDirective
= "\t.4byte\t";
37 Data64bitsDirective
= "\t.8byte\t";
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";
46 UseAssignmentForEHBegin
= true;
47 SupportsDebugInformation
= true;
48 ExceptionsType
= ExceptionHandling::DwarfCFI
;
49 DwarfRegNumForCFI
= true;
50 HasMipsExpressions
= true;
51 UseIntegratedAssembler
= true;