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 | 50f1723 | 2015-09-15 16:17:27 +0000 | [diff] [blame] | 15 | #include "llvm/ADT/Triple.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 | 50f1723 | 2015-09-15 16:17:27 +0000 | [diff] [blame] | 21 | MipsMCAsmInfo::MipsMCAsmInfo(const Triple &TheTriple) { |
Simon Atanasyan | c986eb5 | 2017-04-10 19:42:44 +0000 | [diff] [blame] | 22 | IsLittleEndian = TheTriple.isLittleEndian(); |
Evan Cheng | a83b37a | 2011-07-15 02:09:41 +0000 | [diff] [blame] | 23 | |
Simon Atanasyan | d465318 | 2018-10-09 11:29:45 +0000 | [diff] [blame] | 24 | if (TheTriple.isMIPS64() && TheTriple.getEnvironment() != Triple::GNUABIN32) |
Konstantin Zhuravlyov | dc77b2e | 2017-04-17 17:41:25 +0000 | [diff] [blame] | 25 | CodePointerSize = CalleeSaveStackSlotSize = 8; |
Jack Carter | 9e28cd3 | 2013-01-08 18:53:20 +0000 | [diff] [blame] | 26 | |
Daniel Sanders | 6a73883 | 2016-07-19 10:49:03 +0000 | [diff] [blame] | 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. |
Alexander Richardson | 85e200e | 2018-06-25 16:49:20 +0000 | [diff] [blame] | 30 | if (TheTriple.isMIPS32()) { |
Daniel Sanders | 6a73883 | 2016-07-19 10:49:03 +0000 | [diff] [blame] | 31 | PrivateGlobalPrefix = "$"; |
| 32 | PrivateLabelPrefix = "$"; |
| 33 | } |
| 34 | |
Bruno Cardoso Lopes | 80ab8f9 | 2008-07-14 14:42:54 +0000 | [diff] [blame] | 35 | AlignmentIsInBytes = false; |
Akira Hatanaka | f2bcad9 | 2011-07-01 01:04:43 +0000 | [diff] [blame] | 36 | Data16bitsDirective = "\t.2byte\t"; |
Akira Hatanaka | aa56000 | 2011-05-26 18:59:03 +0000 | [diff] [blame] | 37 | Data32bitsDirective = "\t.4byte\t"; |
Akira Hatanaka | cf10f08 | 2011-12-20 22:52:19 +0000 | [diff] [blame] | 38 | Data64bitsDirective = "\t.8byte\t"; |
Bruno Cardoso Lopes | 80ab8f9 | 2008-07-14 14:42:54 +0000 | [diff] [blame] | 39 | CommentString = "#"; |
Bruno Cardoso Lopes | 80ab8f9 | 2008-07-14 14:42:54 +0000 | [diff] [blame] | 40 | ZeroDirective = "\t.space\t"; |
Chris Lattner | 19bd039 | 2010-01-25 21:10:10 +0000 | [diff] [blame] | 41 | GPRel32Directive = "\t.gpword\t"; |
Akira Hatanaka | f0b0844 | 2012-02-03 04:33:00 +0000 | [diff] [blame] | 42 | GPRel64Directive = "\t.gpdword\t"; |
Simon Atanasyan | eb9ed61 | 2016-08-22 16:18:42 +0000 | [diff] [blame] | 43 | DTPRel32Directive = "\t.dtprelword\t"; |
| 44 | DTPRel64Directive = "\t.dtpreldword\t"; |
| 45 | TPRel32Directive = "\t.tprelword\t"; |
| 46 | TPRel64Directive = "\t.tpreldword\t"; |
Rafael Espindola | f491704 | 2014-06-24 22:45:16 +0000 | [diff] [blame] | 47 | UseAssignmentForEHBegin = true; |
Akira Hatanaka | aa56000 | 2011-05-26 18:59:03 +0000 | [diff] [blame] | 48 | SupportsDebugInformation = true; |
| 49 | ExceptionsType = ExceptionHandling::DwarfCFI; |
Akira Hatanaka | 9c6028f | 2011-07-07 23:56:50 +0000 | [diff] [blame] | 50 | DwarfRegNumForCFI = true; |
Daniel Sanders | 3feeb9c | 2016-08-08 11:50:25 +0000 | [diff] [blame] | 51 | HasMipsExpressions = true; |
Simon Atanasyan | fa02008 | 2018-12-12 15:32:03 +0000 | [diff] [blame] | 52 | UseIntegratedAssembler = true; |
Bruno Cardoso Lopes | 35e43c4 | 2007-06-06 07:42:06 +0000 | [diff] [blame] | 53 | } |