2009-08-22 20:48:53 +00:00
|
|
|
//===-- SparcMCAsmInfo.cpp - Sparc asm properties -------------------------===//
|
2006-09-07 22:05:02 +00:00
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
2007-12-29 20:36:04 +00:00
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
2006-09-07 22:05:02 +00:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
2009-08-22 20:48:53 +00:00
|
|
|
// This file contains the declarations of the SparcMCAsmInfo properties.
|
2006-09-07 22:05:02 +00:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2009-08-22 20:48:53 +00:00
|
|
|
#include "SparcMCAsmInfo.h"
|
2011-07-15 02:09:41 +00:00
|
|
|
#include "llvm/ADT/Triple.h"
|
|
|
|
|
2006-09-07 22:05:02 +00:00
|
|
|
using namespace llvm;
|
|
|
|
|
2011-12-20 02:50:00 +00:00
|
|
|
void SparcELFMCAsmInfo::anchor() { }
|
|
|
|
|
2013-05-10 18:16:59 +00:00
|
|
|
SparcELFMCAsmInfo::SparcELFMCAsmInfo(StringRef TT) {
|
2011-07-15 02:09:41 +00:00
|
|
|
IsLittleEndian = false;
|
|
|
|
Triple TheTriple(TT);
|
2013-08-10 20:13:20 +00:00
|
|
|
bool isV9 = (TheTriple.getArch() == Triple::sparcv9);
|
|
|
|
|
|
|
|
if (isV9) {
|
2013-01-23 16:22:04 +00:00
|
|
|
PointerSize = CalleeSaveStackSlotSize = 8;
|
|
|
|
}
|
2011-07-15 02:09:41 +00:00
|
|
|
|
2006-09-07 22:05:02 +00:00
|
|
|
Data16bitsDirective = "\t.half\t";
|
|
|
|
Data32bitsDirective = "\t.word\t";
|
2013-08-10 20:13:20 +00:00
|
|
|
// .xword is only supported by V9.
|
|
|
|
Data64bitsDirective = (isV9) ? "\t.xword\t" : 0;
|
2006-09-07 22:05:02 +00:00
|
|
|
ZeroDirective = "\t.skip\t";
|
|
|
|
CommentString = "!";
|
2009-09-08 12:47:30 +00:00
|
|
|
HasLEB128 = true;
|
|
|
|
SupportsDebugInformation = true;
|
2013-08-10 20:13:20 +00:00
|
|
|
|
2013-09-26 15:11:00 +00:00
|
|
|
ExceptionsType = ExceptionHandling::DwarfCFI;
|
|
|
|
|
2009-08-08 20:43:12 +00:00
|
|
|
SunStyleELFSectionSwitchSyntax = true;
|
2009-08-26 18:24:12 +00:00
|
|
|
UsesELFSectionDirectiveForBSS = true;
|
2008-08-07 09:51:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|