Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 1 | //===-- MipsTargetAsmInfo.cpp - Mips asm properties -------------*- C++ -*-===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
Chris Lattner | 081ce94 | 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. |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
| 10 | // This file contains the declarations of the MipsTargetAsmInfo properties. |
| 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | #include "MipsTargetAsmInfo.h" |
Bruno Cardoso Lopes | ea37730 | 2007-11-12 19:49:57 +0000 | [diff] [blame] | 15 | #include "MipsTargetMachine.h" |
Dan Gohman | c154449 | 2008-08-05 15:32:23 +0000 | [diff] [blame] | 16 | #include "llvm/GlobalVariable.h" |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 17 | |
| 18 | using namespace llvm; |
| 19 | |
asl | dedcd84 | 2008-07-19 13:16:11 +0000 | [diff] [blame] | 20 | MipsTargetAsmInfo::MipsTargetAsmInfo(const MipsTargetMachine &TM): |
| 21 | ELFTargetAsmInfo(TM) { |
Bruno Cardoso Lopes | 29c1535 | 2008-07-14 14:42:54 +0000 | [diff] [blame] | 22 | |
| 23 | AlignmentIsInBytes = false; |
| 24 | COMMDirectiveTakesAlignment = true; |
| 25 | Data16bitsDirective = "\t.half\t"; |
| 26 | Data32bitsDirective = "\t.word\t"; |
| 27 | Data64bitsDirective = NULL; |
| 28 | PrivateGlobalPrefix = "$"; |
| 29 | JumpTableDataSection = "\t.rdata"; |
| 30 | CommentString = "#"; |
Bruno Cardoso Lopes | 29c1535 | 2008-07-14 14:42:54 +0000 | [diff] [blame] | 31 | ZeroDirective = "\t.space\t"; |
| 32 | BSSSection = "\t.section\t.bss"; |
Bruno Cardoso Lopes | 12355a8 | 2008-07-21 18:52:34 +0000 | [diff] [blame] | 33 | CStringSection = ".rodata.str"; |
Bruno Cardoso Lopes | ea37730 | 2007-11-12 19:49:57 +0000 | [diff] [blame] | 34 | |
Chris Lattner | f6fdaf3 | 2009-07-24 03:11:51 +0000 | [diff] [blame] | 35 | if (!TM.getSubtarget<MipsSubtarget>().hasABICall()) { |
Bruno Cardoso Lopes | ea37730 | 2007-11-12 19:49:57 +0000 | [diff] [blame] | 36 | JumpTableDirective = "\t.word\t"; |
Bruno Cardoso Lopes | 69ca2ca | 2008-07-23 16:01:50 +0000 | [diff] [blame] | 37 | SmallDataSection = getNamedSection("\t.sdata", SectionFlags::Writeable); |
Anton Korobeynikov | 4d43322 | 2008-09-24 22:20:27 +0000 | [diff] [blame] | 38 | SmallBSSSection = getNamedSection("\t.sbss", |
| 39 | SectionFlags::Writeable | |
Bruno Cardoso Lopes | 69ca2ca | 2008-07-23 16:01:50 +0000 | [diff] [blame] | 40 | SectionFlags::BSS); |
Chris Lattner | f6fdaf3 | 2009-07-24 03:11:51 +0000 | [diff] [blame] | 41 | } else { |
Bruno Cardoso Lopes | ea37730 | 2007-11-12 19:49:57 +0000 | [diff] [blame] | 42 | JumpTableDirective = "\t.gpword\t"; |
Bruno Cardoso Lopes | 8291a62 | 2008-07-22 15:34:27 +0000 | [diff] [blame] | 43 | } |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 44 | } |