Jia Liu | 9f61011 | 2012-02-17 08:55:11 +0000 | [diff] [blame] | 1 | //===-- MipsMCAsmInfo.cpp - Mips Asm Properties ---------------------------===// |
Bruno Cardoso Lopes | 35e43c4 | 2007-06-06 07:42:06 +0000 | [diff] [blame] | 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
Chris Lattner | f3ebc3f | 2007-12-29 20:36:04 +0000 | [diff] [blame] | 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
Bruno Cardoso Lopes | 35e43c4 | 2007-06-06 07:42:06 +0000 | [diff] [blame] | 7 | // |
Akira Hatanaka | e248912 | 2011-04-15 21:51:11 +0000 | [diff] [blame] | 8 | //===----------------------------------------------------------------------===// |
Bruno Cardoso Lopes | 35e43c4 | 2007-06-06 07:42:06 +0000 | [diff] [blame] | 9 | // |
Chris Lattner | 7b26fce | 2009-08-22 20:48:53 +0000 | [diff] [blame] | 10 | // This file contains the declarations of the MipsMCAsmInfo properties. |
Bruno Cardoso Lopes | 35e43c4 | 2007-06-06 07:42:06 +0000 | [diff] [blame] | 11 | // |
Akira Hatanaka | e248912 | 2011-04-15 21:51:11 +0000 | [diff] [blame] | 12 | //===----------------------------------------------------------------------===// |
Bruno Cardoso Lopes | 35e43c4 | 2007-06-06 07:42:06 +0000 | [diff] [blame] | 13 | |
Chris Lattner | 7b26fce | 2009-08-22 20:48:53 +0000 | [diff] [blame] | 14 | #include "MipsMCAsmInfo.h" |
Daniel Sanders | 153010c | 2015-09-15 14:08:28 +0000 | [diff] [blame] | 15 | #include "llvm/ADT/TargetTuple.h" |
Evan Cheng | a83b37a | 2011-07-15 02:09:41 +0000 | [diff] [blame] | 16 | |
Bruno Cardoso Lopes | 35e43c4 | 2007-06-06 07:42:06 +0000 | [diff] [blame] | 17 | using namespace llvm; |
| 18 | |
David Blaikie | a379b181 | 2011-12-20 02:50:00 +0000 | [diff] [blame] | 19 | void MipsMCAsmInfo::anchor() { } |
| 20 | |
Daniel Sanders | 153010c | 2015-09-15 14:08:28 +0000 | [diff] [blame] | 21 | MipsMCAsmInfo::MipsMCAsmInfo(const TargetTuple &TT) { |
| 22 | if ((TT.getArch() == TargetTuple::mips) || |
| 23 | (TT.getArch() == TargetTuple::mips64)) |
Evan Cheng | a83b37a | 2011-07-15 02:09:41 +0000 | [diff] [blame] | 24 | IsLittleEndian = false; |
| 25 | |
Daniel Sanders | 153010c | 2015-09-15 14:08:28 +0000 | [diff] [blame] | 26 | if ((TT.getArch() == TargetTuple::mips64el) || |
| 27 | (TT.getArch() == TargetTuple::mips64)) { |
Eli Bendersky | 32aab22 | 2013-01-23 16:22:04 +0000 | [diff] [blame] | 28 | PointerSize = CalleeSaveStackSlotSize = 8; |
| 29 | } |
Jack Carter | 9e28cd3 | 2013-01-08 18:53:20 +0000 | [diff] [blame] | 30 | |
Bruno Cardoso Lopes | 80ab8f9 | 2008-07-14 14:42:54 +0000 | [diff] [blame] | 31 | AlignmentIsInBytes = false; |
Akira Hatanaka | f2bcad9 | 2011-07-01 01:04:43 +0000 | [diff] [blame] | 32 | Data16bitsDirective = "\t.2byte\t"; |
Akira Hatanaka | aa56000 | 2011-05-26 18:59:03 +0000 | [diff] [blame] | 33 | Data32bitsDirective = "\t.4byte\t"; |
Akira Hatanaka | cf10f08 | 2011-12-20 22:52:19 +0000 | [diff] [blame] | 34 | Data64bitsDirective = "\t.8byte\t"; |
Daniel Sanders | 69c6008 | 2015-05-20 14:18:59 +0000 | [diff] [blame] | 35 | PrivateGlobalPrefix = "$"; |
| 36 | PrivateLabelPrefix = "$"; |
Bruno Cardoso Lopes | 80ab8f9 | 2008-07-14 14:42:54 +0000 | [diff] [blame] | 37 | CommentString = "#"; |
Bruno Cardoso Lopes | 80ab8f9 | 2008-07-14 14:42:54 +0000 | [diff] [blame] | 38 | ZeroDirective = "\t.space\t"; |
Chris Lattner | 19bd039 | 2010-01-25 21:10:10 +0000 | [diff] [blame] | 39 | GPRel32Directive = "\t.gpword\t"; |
Akira Hatanaka | f0b0844 | 2012-02-03 04:33:00 +0000 | [diff] [blame] | 40 | GPRel64Directive = "\t.gpdword\t"; |
Rafael Espindola | f491704 | 2014-06-24 22:45:16 +0000 | [diff] [blame] | 41 | UseAssignmentForEHBegin = true; |
Akira Hatanaka | aa56000 | 2011-05-26 18:59:03 +0000 | [diff] [blame] | 42 | SupportsDebugInformation = true; |
| 43 | ExceptionsType = ExceptionHandling::DwarfCFI; |
Akira Hatanaka | 9c6028f | 2011-07-07 23:56:50 +0000 | [diff] [blame] | 44 | DwarfRegNumForCFI = true; |
Bruno Cardoso Lopes | 35e43c4 | 2007-06-06 07:42:06 +0000 | [diff] [blame] | 45 | } |