SparcMCAsmInfo.cpp revision 224133
1//===-- SparcMCAsmInfo.cpp - Sparc asm properties -------------------------===//
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 SparcMCAsmInfo properties.
11//
12//===----------------------------------------------------------------------===//
13
14#include "SparcMCAsmInfo.h"
15#include "llvm/ADT/Triple.h"
16
17using namespace llvm;
18
19SparcELFMCAsmInfo::SparcELFMCAsmInfo(const Target &T, StringRef TT) {
20  IsLittleEndian = false;
21  Triple TheTriple(TT);
22  if (TheTriple.getArch() == Triple::sparcv9)
23    PointerSize = 8;
24
25  Data16bitsDirective = "\t.half\t";
26  Data32bitsDirective = "\t.word\t";
27  Data64bitsDirective = 0;  // .xword is only supported by V9.
28  ZeroDirective = "\t.skip\t";
29  CommentString = "!";
30  HasLEB128 = true;
31  SupportsDebugInformation = true;
32
33  SunStyleELFSectionSwitchSyntax = true;
34  UsesELFSectionDirectiveForBSS = true;
35
36  WeakRefDirective = "\t.weak\t";
37
38  PrivateGlobalPrefix = ".L";
39}
40
41
42