1 //===-- SparcTargetAsmInfo.cpp - Sparc asm properties -----------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file contains the declarations of the SparcTargetAsmInfo properties.
12 //===----------------------------------------------------------------------===//
14 #include "SparcTargetAsmInfo.h"
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";
25 ConstantPoolSection = "\t.section \".rodata\",#alloc\n";
26 COMMDirectiveTakesAlignment = true;
27 CStringSection=".rodata.str";
30 std::string SparcELFTargetAsmInfo::PrintSectionFlags(unsigned flags) const {
31 std::string Flags = ",";
33 if (flags & SectionFlags::Mergeable)
34 return ELFTargetAsmInfo::PrintSectionFlags(flags);
36 if (!(flags & SectionFlags::Debug))
38 if (flags & SectionFlags::Code)
39 Flags += "#execinstr";
40 if (flags & SectionFlags::Writeable)
42 if (flags & SectionFlags::TLS)