blob: 40c6e7f9545f9d97dfa68a6e9591ebb7ebeb079c [file] [log] [blame]
Bruno Cardoso Lopes972f5892007-06-06 07:42:06 +00001//===-- MipsTargetAsmInfo.cpp - Mips asm properties -------------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
Chris Lattner4ee451d2007-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 Lopes972f5892007-06-06 07:42:06 +00007//
8//===----------------------------------------------------------------------===//
9//
10// This file contains the declarations of the MipsTargetAsmInfo properties.
11//
12//===----------------------------------------------------------------------===//
13
14#include "MipsTargetAsmInfo.h"
Bruno Cardoso Lopes753a9872007-11-12 19:49:57 +000015#include "MipsTargetMachine.h"
Bruno Cardoso Lopes972f5892007-06-06 07:42:06 +000016
17using namespace llvm;
18
Anton Korobeynikovae408e62008-07-19 13:16:11 +000019MipsTargetAsmInfo::MipsTargetAsmInfo(const MipsTargetMachine &TM):
20 ELFTargetAsmInfo(TM) {
Bruno Cardoso Lopes43d526d2008-07-14 14:42:54 +000021
22 AlignmentIsInBytes = false;
23 COMMDirectiveTakesAlignment = true;
24 Data16bitsDirective = "\t.half\t";
25 Data32bitsDirective = "\t.word\t";
26 Data64bitsDirective = NULL;
27 PrivateGlobalPrefix = "$";
28 JumpTableDataSection = "\t.rdata";
29 CommentString = "#";
30 ReadOnlySection = "\t.rdata";
31 ZeroDirective = "\t.space\t";
32 BSSSection = "\t.section\t.bss";
33 LCOMMDirective = "\t.lcomm\t";
Bruno Cardoso Lopes91fd5322008-07-21 18:52:34 +000034 CStringSection = ".rodata.str";
Bruno Cardoso Lopes753a9872007-11-12 19:49:57 +000035
Bruno Cardoso Lopesb27cb552008-07-15 02:03:36 +000036 if (!TM.getSubtarget<MipsSubtarget>().hasABICall())
Bruno Cardoso Lopes753a9872007-11-12 19:49:57 +000037 JumpTableDirective = "\t.word\t";
Anton Korobeynikovae408e62008-07-19 13:16:11 +000038 else
Bruno Cardoso Lopes753a9872007-11-12 19:49:57 +000039 JumpTableDirective = "\t.gpword\t";
40
Bruno Cardoso Lopes972f5892007-06-06 07:42:06 +000041}