blob: 1fa02f297de91442e698e08a0c29b2f516168633 [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001//===-- MipsTargetAsmInfo.cpp - Mips asm properties -------------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
Chris Lattner081ce942007-12-29 20:36:04 +00005// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
Dan Gohmanf17a25c2007-07-18 16:29:46 +00007//
8//===----------------------------------------------------------------------===//
9//
10// This file contains the declarations of the MipsTargetAsmInfo properties.
11//
12//===----------------------------------------------------------------------===//
13
14#include "MipsTargetAsmInfo.h"
Bruno Cardoso Lopesea377302007-11-12 19:49:57 +000015#include "MipsTargetMachine.h"
Dan Gohmanf17a25c2007-07-18 16:29:46 +000016using namespace llvm;
17
Chris Lattner2b8e99a2009-07-24 03:16:53 +000018MipsTargetAsmInfo::MipsTargetAsmInfo(const MipsTargetMachine &TM)
19 : ELFTargetAsmInfo(TM) {
Bruno Cardoso Lopes29c15352008-07-14 14:42:54 +000020
21 AlignmentIsInBytes = false;
22 COMMDirectiveTakesAlignment = true;
23 Data16bitsDirective = "\t.half\t";
24 Data32bitsDirective = "\t.word\t";
25 Data64bitsDirective = NULL;
26 PrivateGlobalPrefix = "$";
27 JumpTableDataSection = "\t.rdata";
28 CommentString = "#";
Bruno Cardoso Lopes29c15352008-07-14 14:42:54 +000029 ZeroDirective = "\t.space\t";
30 BSSSection = "\t.section\t.bss";
Bruno Cardoso Lopes12355a82008-07-21 18:52:34 +000031 CStringSection = ".rodata.str";
Bruno Cardoso Lopesea377302007-11-12 19:49:57 +000032
Chris Lattner2b8e99a2009-07-24 03:16:53 +000033 if (!TM.getSubtarget<MipsSubtarget>().hasABICall())
Bruno Cardoso Lopesea377302007-11-12 19:49:57 +000034 JumpTableDirective = "\t.word\t";
Chris Lattner2b8e99a2009-07-24 03:16:53 +000035 else
Bruno Cardoso Lopesea377302007-11-12 19:49:57 +000036 JumpTableDirective = "\t.gpword\t";
Dan Gohmanf17a25c2007-07-18 16:29:46 +000037}