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 anchor()19void MipsMCAsmInfo::anchor() { } 20 MipsMCAsmInfo(const Triple & TheTriple)21MipsMCAsmInfo::MipsMCAsmInfo(const Triple &TheTriple) { 22 IsLittleEndian = TheTriple.isLittleEndian(); 23 24 if (TheTriple.isMIPS64() && TheTriple.getEnvironment() != Triple::GNUABIN32) 25 CodePointerSize = CalleeSaveStackSlotSize = 8; 26 27 // FIXME: This condition isn't quite right but it's the best we can do until 28 // this object can identify the ABI. It will misbehave when using O32 29 // on a mips64*-* triple. 30 if (TheTriple.isMIPS32()) { 31 PrivateGlobalPrefix = "$"; 32 PrivateLabelPrefix = "$"; 33 } 34 35 AlignmentIsInBytes = false; 36 Data16bitsDirective = "\t.2byte\t"; 37 Data32bitsDirective = "\t.4byte\t"; 38 Data64bitsDirective = "\t.8byte\t"; 39 CommentString = "#"; 40 ZeroDirective = "\t.space\t"; 41 GPRel32Directive = "\t.gpword\t"; 42 GPRel64Directive = "\t.gpdword\t"; 43 DTPRel32Directive = "\t.dtprelword\t"; 44 DTPRel64Directive = "\t.dtpreldword\t"; 45 TPRel32Directive = "\t.tprelword\t"; 46 TPRel64Directive = "\t.tpreldword\t"; 47 UseAssignmentForEHBegin = true; 48 SupportsDebugInformation = true; 49 ExceptionsType = ExceptionHandling::DwarfCFI; 50 DwarfRegNumForCFI = true; 51 HasMipsExpressions = true; 52 UseIntegratedAssembler = true; 53 } 54