blob: a6797492d88c963d09e3daa91d4e4522c326e586 [file] [log] [blame]
Jia Liu9f610112012-02-17 08:55:11 +00001//===-- MipsMCAsmInfo.cpp - Mips Asm Properties ---------------------------===//
Bruno Cardoso Lopes35e43c42007-06-06 07:42:06 +00002//
3// The LLVM Compiler Infrastructure
4//
Chris Lattnerf3ebc3f2007-12-29 20:36:04 +00005// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
Bruno Cardoso Lopes35e43c42007-06-06 07:42:06 +00007//
Akira Hatanakae2489122011-04-15 21:51:11 +00008//===----------------------------------------------------------------------===//
Bruno Cardoso Lopes35e43c42007-06-06 07:42:06 +00009//
Chris Lattner7b26fce2009-08-22 20:48:53 +000010// This file contains the declarations of the MipsMCAsmInfo properties.
Bruno Cardoso Lopes35e43c42007-06-06 07:42:06 +000011//
Akira Hatanakae2489122011-04-15 21:51:11 +000012//===----------------------------------------------------------------------===//
Bruno Cardoso Lopes35e43c42007-06-06 07:42:06 +000013
Chris Lattner7b26fce2009-08-22 20:48:53 +000014#include "MipsMCAsmInfo.h"
Evan Chenga83b37a2011-07-15 02:09:41 +000015#include "llvm/ADT/Triple.h"
16
Bruno Cardoso Lopes35e43c42007-06-06 07:42:06 +000017using namespace llvm;
18
David Blaikiea379b1812011-12-20 02:50:00 +000019void MipsMCAsmInfo::anchor() { }
20
Benjamin Kramer92d89982010-07-14 22:38:02 +000021MipsMCAsmInfo::MipsMCAsmInfo(const Target &T, StringRef TT) {
Evan Chenga83b37a2011-07-15 02:09:41 +000022 Triple TheTriple(TT);
Akira Hatanaka3d673cc2011-09-21 03:00:58 +000023 if ((TheTriple.getArch() == Triple::mips) ||
24 (TheTriple.getArch() == Triple::mips64))
Evan Chenga83b37a2011-07-15 02:09:41 +000025 IsLittleEndian = false;
26
Jack Carter9e28cd32013-01-08 18:53:20 +000027 if ((TheTriple.getArch() == Triple::mips64el) ||
28 (TheTriple.getArch() == Triple::mips64))
29 PointerSize = 8;
30
Bruno Cardoso Lopes80ab8f92008-07-14 14:42:54 +000031 AlignmentIsInBytes = false;
Akira Hatanakaf2bcad92011-07-01 01:04:43 +000032 Data16bitsDirective = "\t.2byte\t";
Akira Hatanakaaa560002011-05-26 18:59:03 +000033 Data32bitsDirective = "\t.4byte\t";
Akira Hatanakacf10f082011-12-20 22:52:19 +000034 Data64bitsDirective = "\t.8byte\t";
Bruno Cardoso Lopes80ab8f92008-07-14 14:42:54 +000035 PrivateGlobalPrefix = "$";
Bruno Cardoso Lopes80ab8f92008-07-14 14:42:54 +000036 CommentString = "#";
Bruno Cardoso Lopes80ab8f92008-07-14 14:42:54 +000037 ZeroDirective = "\t.space\t";
Chris Lattner19bd0392010-01-25 21:10:10 +000038 GPRel32Directive = "\t.gpword\t";
Akira Hatanakaf0b08442012-02-03 04:33:00 +000039 GPRel64Directive = "\t.gpdword\t";
Akira Hatanakafa63d302011-05-25 23:30:30 +000040 WeakRefDirective = "\t.weak\t";
Reed Kotleraee4d5d12012-12-16 04:00:45 +000041 DebugLabelSuffix = "=.";
Akira Hatanakaaa560002011-05-26 18:59:03 +000042 SupportsDebugInformation = true;
43 ExceptionsType = ExceptionHandling::DwarfCFI;
44 HasLEB128 = true;
Akira Hatanaka9c6028f2011-07-07 23:56:50 +000045 DwarfRegNumForCFI = true;
Bruno Cardoso Lopes35e43c42007-06-06 07:42:06 +000046}