1 //===-- LoongArchMCAsmInfo.cpp - LoongArch Asm properties ------*- C++ -*--===//
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 LoongArchMCAsmInfo properties.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #include "LoongArchMCAsmInfo.h"
14 #include "llvm/ADT/Triple.h"
15 #include "llvm/BinaryFormat/Dwarf.h"
16 #include "llvm/MC/MCStreamer.h"
17 
18 using namespace llvm;
19 
20 void LoongArchMCAsmInfo::anchor() {}
21 
22 LoongArchMCAsmInfo::LoongArchMCAsmInfo(const Triple &TT) {
23   CodePointerSize = CalleeSaveStackSlotSize = TT.isArch64Bit() ? 8 : 4;
24   AlignmentIsInBytes = false;
25   Data8bitsDirective = "\t.byte\t";
26   Data16bitsDirective = "\t.half\t";
27   Data32bitsDirective = "\t.word\t";
28   Data64bitsDirective = "\t.dword\t";
29   ZeroDirective = "\t.space\t";
30   CommentString = "#";
31   SupportsDebugInformation = true;
32   DwarfRegNumForCFI = true;
33   ExceptionsType = ExceptionHandling::DwarfCFI;
34 }
35