Add proper ISD::RET lowering
[llvm/msp430.git] / lib / Target / Sparc / SparcTargetAsmInfo.cpp
blobc13d45ceec7cf9ad209dc450cfe69b6f898388fb
1 //===-- SparcTargetAsmInfo.cpp - Sparc asm properties -----------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file contains the declarations of the SparcTargetAsmInfo properties.
12 //===----------------------------------------------------------------------===//
14 #include "SparcTargetAsmInfo.h"
16 using namespace llvm;
18 SparcELFTargetAsmInfo::SparcELFTargetAsmInfo(const TargetMachine &TM):
19 ELFTargetAsmInfo(TM) {
20 Data16bitsDirective = "\t.half\t";
21 Data32bitsDirective = "\t.word\t";
22 Data64bitsDirective = 0; // .xword is only supported by V9.
23 ZeroDirective = "\t.skip\t";
24 CommentString = "!";
25 ConstantPoolSection = "\t.section \".rodata\",#alloc\n";
26 COMMDirectiveTakesAlignment = true;
27 CStringSection=".rodata.str";
29 // Sparc normally uses named section for BSS.
30 BSSSection_ = getNamedSection("\t.bss",
31 SectionFlags::Writeable | SectionFlags::BSS,
32 /* Override */ true);
35 std::string SparcELFTargetAsmInfo::printSectionFlags(unsigned flags) const {
36 if (flags & SectionFlags::Mergeable)
37 return ELFTargetAsmInfo::printSectionFlags(flags);
39 std::string Flags;
40 if (!(flags & SectionFlags::Debug))
41 Flags += ",#alloc";
42 if (flags & SectionFlags::Code)
43 Flags += ",#execinstr";
44 if (flags & SectionFlags::Writeable)
45 Flags += ",#write";
46 if (flags & SectionFlags::TLS)
47 Flags += ",#tls";
49 return Flags;