]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCAsmInfo.cpp
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / contrib / llvm / lib / Target / Sparc / MCTargetDesc / SparcMCAsmInfo.cpp
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
17 using namespace llvm;
18
19 void SparcELFMCAsmInfo::anchor() { }
20
21 SparcELFMCAsmInfo::SparcELFMCAsmInfo(const Target &T, StringRef TT) {
22   IsLittleEndian = false;
23   Triple TheTriple(TT);
24   if (TheTriple.getArch() == Triple::sparcv9) {
25     PointerSize = CalleeSaveStackSlotSize = 8;
26   }
27
28   Data16bitsDirective = "\t.half\t";
29   Data32bitsDirective = "\t.word\t";
30   Data64bitsDirective = 0;  // .xword is only supported by V9.
31   ZeroDirective = "\t.skip\t";
32   CommentString = "!";
33   HasLEB128 = true;
34   SupportsDebugInformation = true;
35   
36   SunStyleELFSectionSwitchSyntax = true;
37   UsesELFSectionDirectiveForBSS = true;
38
39   WeakRefDirective = "\t.weak\t";
40
41   PrivateGlobalPrefix = ".L";
42 }
43
44