10b57cec5SDimitry Andric //===-- MipsMCAsmInfo.cpp - Mips Asm Properties ---------------------------===// 20b57cec5SDimitry Andric // 30b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 40b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information. 50b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 60b57cec5SDimitry Andric // 70b57cec5SDimitry Andric //===----------------------------------------------------------------------===// 80b57cec5SDimitry Andric // 90b57cec5SDimitry Andric // This file contains the declarations of the MipsMCAsmInfo properties. 100b57cec5SDimitry Andric // 110b57cec5SDimitry Andric //===----------------------------------------------------------------------===// 120b57cec5SDimitry Andric 130b57cec5SDimitry Andric #include "MipsMCAsmInfo.h" 14480093f4SDimitry Andric #include "MipsABIInfo.h" 15*06c3fb27SDimitry Andric #include "llvm/TargetParser/Triple.h" 160b57cec5SDimitry Andric 170b57cec5SDimitry Andric using namespace llvm; 180b57cec5SDimitry Andric anchor()190b57cec5SDimitry Andricvoid MipsMCAsmInfo::anchor() { } 200b57cec5SDimitry Andric MipsMCAsmInfo(const Triple & TheTriple,const MCTargetOptions & Options)21480093f4SDimitry AndricMipsMCAsmInfo::MipsMCAsmInfo(const Triple &TheTriple, 22480093f4SDimitry Andric const MCTargetOptions &Options) { 230b57cec5SDimitry Andric IsLittleEndian = TheTriple.isLittleEndian(); 240b57cec5SDimitry Andric 25480093f4SDimitry Andric MipsABIInfo ABI = MipsABIInfo::computeTargetABI(TheTriple, "", Options); 26480093f4SDimitry Andric 27480093f4SDimitry Andric if (TheTriple.isMIPS64() && !ABI.IsN32()) 280b57cec5SDimitry Andric CodePointerSize = CalleeSaveStackSlotSize = 8; 290b57cec5SDimitry Andric 30480093f4SDimitry Andric if (ABI.IsO32()) 310b57cec5SDimitry Andric PrivateGlobalPrefix = "$"; 32480093f4SDimitry Andric else if (ABI.IsN32() || ABI.IsN64()) 33480093f4SDimitry Andric PrivateGlobalPrefix = ".L"; 34480093f4SDimitry Andric PrivateLabelPrefix = PrivateGlobalPrefix; 350b57cec5SDimitry Andric 360b57cec5SDimitry Andric AlignmentIsInBytes = false; 370b57cec5SDimitry Andric Data16bitsDirective = "\t.2byte\t"; 380b57cec5SDimitry Andric Data32bitsDirective = "\t.4byte\t"; 390b57cec5SDimitry Andric Data64bitsDirective = "\t.8byte\t"; 400b57cec5SDimitry Andric CommentString = "#"; 410b57cec5SDimitry Andric ZeroDirective = "\t.space\t"; 420b57cec5SDimitry Andric GPRel32Directive = "\t.gpword\t"; 430b57cec5SDimitry Andric GPRel64Directive = "\t.gpdword\t"; 440b57cec5SDimitry Andric DTPRel32Directive = "\t.dtprelword\t"; 450b57cec5SDimitry Andric DTPRel64Directive = "\t.dtpreldword\t"; 460b57cec5SDimitry Andric TPRel32Directive = "\t.tprelword\t"; 470b57cec5SDimitry Andric TPRel64Directive = "\t.tpreldword\t"; 480b57cec5SDimitry Andric UseAssignmentForEHBegin = true; 490b57cec5SDimitry Andric SupportsDebugInformation = true; 500b57cec5SDimitry Andric ExceptionsType = ExceptionHandling::DwarfCFI; 510b57cec5SDimitry Andric DwarfRegNumForCFI = true; 520b57cec5SDimitry Andric HasMipsExpressions = true; 530b57cec5SDimitry Andric } 54