blob: ceaee4b8c9932d649fae0caf89ee2fae793963e5 [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 +000016
17using namespace llvm;
18
asldedcd842008-07-19 13:16:11 +000019MipsTargetAsmInfo::MipsTargetAsmInfo(const MipsTargetMachine &TM):
20 ELFTargetAsmInfo(TM) {
Bruno Cardoso Lopes29c15352008-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 Lopesea377302007-11-12 19:49:57 +000034
Bruno Cardoso Lopesf2e9be62008-07-15 02:03:36 +000035 if (!TM.getSubtarget<MipsSubtarget>().hasABICall())
Bruno Cardoso Lopesea377302007-11-12 19:49:57 +000036 JumpTableDirective = "\t.word\t";
asldedcd842008-07-19 13:16:11 +000037 else
Bruno Cardoso Lopesea377302007-11-12 19:49:57 +000038 JumpTableDirective = "\t.gpword\t";
39
Dan Gohmanf17a25c2007-07-18 16:29:46 +000040}