summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-08-22 20:58:17 +0000
committerChris Lattner <sabre@nondot.org>2009-08-22 20:58:17 +0000
commit2b9f0d100bd3a0f86614d747689a05028d864a21 (patch)
tree41ec7409cacfdd1beb07beed0e14030d108ca0ed /llvm/lib/Target
parent757dd1cd93eda48b15e3ff77771c92bf60562124 (diff)
downloadbcm5719-llvm-2b9f0d100bd3a0f86614d747689a05028d864a21.tar.gz
bcm5719-llvm-2b9f0d100bd3a0f86614d747689a05028d864a21.zip
move the MCAsmInfo .cpp/.h files into the right
directories and rename them. llvm-svn: 79768
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/COFFTargetAsmInfo.cpp37
-rw-r--r--llvm/lib/Target/DarwinTargetAsmInfo.cpp59
-rw-r--r--llvm/lib/Target/TargetAsmInfo.cpp113
3 files changed, 0 insertions, 209 deletions
diff --git a/llvm/lib/Target/COFFTargetAsmInfo.cpp b/llvm/lib/Target/COFFTargetAsmInfo.cpp
deleted file mode 100644
index 7586eaceb63..00000000000
--- a/llvm/lib/Target/COFFTargetAsmInfo.cpp
+++ /dev/null
@@ -1,37 +0,0 @@
-//===-- COFFMCAsmInfo.cpp - COFF asm properties -----------------*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This file defines target asm properties related what form asm statements
-// should take in general on COFF-based targets
-//
-//===----------------------------------------------------------------------===//
-
-#include "llvm/MC/MCAsmInfoCOFF.h"
-#include "llvm/ADT/SmallVector.h"
-using namespace llvm;
-
-COFFMCAsmInfo::COFFMCAsmInfo() {
- GlobalPrefix = "_";
- LCOMMDirective = "\t.lcomm\t";
- COMMDirectiveTakesAlignment = false;
- HasDotTypeDotSizeDirective = false;
- HasSingleParameterDotFile = false;
- HiddenDirective = NULL;
- PrivateGlobalPrefix = "L"; // Prefix for private global symbols
- WeakRefDirective = "\t.weak\t";
- SetDirective = "\t.set\t";
-
- // Set up DWARF directives
- HasLEB128 = true; // Target asm supports leb128 directives (little-endian)
- AbsoluteDebugSectionOffsets = true;
- AbsoluteEHSectionOffsets = false;
- SupportsDebugInformation = true;
- DwarfSectionOffsetDirective = "\t.secrel32\t";
-}
-
diff --git a/llvm/lib/Target/DarwinTargetAsmInfo.cpp b/llvm/lib/Target/DarwinTargetAsmInfo.cpp
deleted file mode 100644
index 8e8c6f838e3..00000000000
--- a/llvm/lib/Target/DarwinTargetAsmInfo.cpp
+++ /dev/null
@@ -1,59 +0,0 @@
-//===-- MCAsmInfoDarwin.cpp - Darwin asm properties -------------*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This file defines target asm properties related what form asm statements
-// should take in general on Darwin-based targets
-//
-//===----------------------------------------------------------------------===//
-
-#include "llvm/MC/MCAsmInfoDarwin.h"
-using namespace llvm;
-
-DarwinMCAsmInfo::DarwinMCAsmInfo() {
- // Common settings for all Darwin targets.
- // Syntax:
- GlobalPrefix = "_";
- PrivateGlobalPrefix = "L";
- LinkerPrivateGlobalPrefix = "l"; // Marker for some ObjC metadata
- NeedsSet = true;
- NeedsIndirectEncoding = true;
- AllowQuotesInName = true;
- HasSingleParameterDotFile = false;
-
- AlignmentIsInBytes = false;
- InlineAsmStart = " InlineAsm Start";
- InlineAsmEnd = " InlineAsm End";
-
- // In non-PIC modes, emit a special label before jump tables so that the
- // linker can perform more accurate dead code stripping. We do not check the
- // relocation model here since it can be overridden later.
- JumpTableSpecialLabelPrefix = "l";
-
- // Directives:
- WeakDefDirective = "\t.weak_definition ";
- WeakRefDirective = "\t.weak_reference ";
- HiddenDirective = "\t.private_extern ";
- LCOMMDirective = "\t.lcomm\t";
- ZeroDirective = "\t.space\t"; // ".space N" emits N zeros.
- ZeroFillDirective = "\t.zerofill\t"; // Uses .zerofill
- SetDirective = "\t.set";
- ProtectedDirective = "\t.globl\t";
- HasDotTypeDotSizeDirective = false;
- UsedDirective = "\t.no_dead_strip\t";
-
- // _foo.eh symbols are currently always exported so that the linker knows
- // about them. This is not necessary on 10.6 and later, but it
- // doesn't hurt anything.
- // FIXME: I need to get this from Triple.
- Is_EHSymbolPrivate = false;
- GlobalEHDirective = "\t.globl\t";
- SupportsWeakOmittedEHFrame = false;
-
-}
-
diff --git a/llvm/lib/Target/TargetAsmInfo.cpp b/llvm/lib/Target/TargetAsmInfo.cpp
deleted file mode 100644
index c38bf703ec2..00000000000
--- a/llvm/lib/Target/TargetAsmInfo.cpp
+++ /dev/null
@@ -1,113 +0,0 @@
-//===-- MCAsmInfo.cpp - Asm Info -------------------------------------------==//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This file defines target asm properties related what form asm statements
-// should take.
-//
-//===----------------------------------------------------------------------===//
-
-#include "llvm/MC/MCAsmInfo.h"
-#include <cctype>
-#include <cstring>
-using namespace llvm;
-
-MCAsmInfo::MCAsmInfo() {
- ZeroFillDirective = 0;
- NonexecutableStackDirective = 0;
- NeedsSet = false;
- MaxInstLength = 4;
- PCSymbol = "$";
- SeparatorChar = ';';
- CommentColumn = 60;
- CommentString = "#";
- GlobalPrefix = "";
- PrivateGlobalPrefix = ".";
- LinkerPrivateGlobalPrefix = "";
- JumpTableSpecialLabelPrefix = 0;
- GlobalVarAddrPrefix = "";
- GlobalVarAddrSuffix = "";
- FunctionAddrPrefix = "";
- FunctionAddrSuffix = "";
- PersonalityPrefix = "";
- PersonalitySuffix = "";
- NeedsIndirectEncoding = false;
- InlineAsmStart = "APP";
- InlineAsmEnd = "NO_APP";
- AssemblerDialect = 0;
- AllowQuotesInName = false;
- ZeroDirective = "\t.zero\t";
- ZeroDirectiveSuffix = 0;
- AsciiDirective = "\t.ascii\t";
- AscizDirective = "\t.asciz\t";
- Data8bitsDirective = "\t.byte\t";
- Data16bitsDirective = "\t.short\t";
- Data32bitsDirective = "\t.long\t";
- Data64bitsDirective = "\t.quad\t";
- SunStyleELFSectionSwitchSyntax = false;
- UsesELFSectionDirectiveForBSS = false;
- AlignDirective = "\t.align\t";
- AlignmentIsInBytes = true;
- TextAlignFillValue = 0;
- JumpTableDirective = 0;
- PICJumpTableDirective = 0;
- GlobalDirective = "\t.globl\t";
- SetDirective = 0;
- LCOMMDirective = 0;
- COMMDirective = "\t.comm\t";
- COMMDirectiveTakesAlignment = true;
- HasDotTypeDotSizeDirective = true;
- HasSingleParameterDotFile = true;
- UsedDirective = 0;
- WeakRefDirective = 0;
- WeakDefDirective = 0;
- // FIXME: These are ELFish - move to ELFTAI.
- HiddenDirective = "\t.hidden\t";
- ProtectedDirective = "\t.protected\t";
- AbsoluteDebugSectionOffsets = false;
- AbsoluteEHSectionOffsets = false;
- HasLEB128 = false;
- HasDotLocAndDotFile = false;
- SupportsDebugInformation = false;
- ExceptionsType = ExceptionHandling::None;
- DwarfRequiresFrameSection = true;
- DwarfUsesInlineInfoSection = false;
- Is_EHSymbolPrivate = true;
- GlobalEHDirective = 0;
- SupportsWeakOmittedEHFrame = true;
- DwarfSectionOffsetDirective = 0;
-
- AsmTransCBE = 0;
-}
-
-MCAsmInfo::~MCAsmInfo() {
-}
-
-
-unsigned MCAsmInfo::getULEB128Size(unsigned Value) {
- unsigned Size = 0;
- do {
- Value >>= 7;
- Size += sizeof(int8_t);
- } while (Value);
- return Size;
-}
-
-unsigned MCAsmInfo::getSLEB128Size(int Value) {
- unsigned Size = 0;
- int Sign = Value >> (8 * sizeof(Value) - 1);
- bool IsMore;
-
- do {
- unsigned Byte = Value & 0x7f;
- Value >>= 7;
- IsMore = Value != Sign || ((Byte ^ Sign) & 0x40) != 0;
- Size += sizeof(int8_t);
- } while (IsMore);
- return Size;
-}
OpenPOWER on IntegriCloud