This is a follow-up to r203635. Saleem pointed out that since symbolic register names are much easier to read, it would be good if we could turn them off only when we really need to because we're using an external assembler. Differential Revision: http://llvm-reviews.chandlerc.com/D3056 llvm-svn: 203806
68 lines
1.8 KiB
C++
68 lines
1.8 KiB
C++
//===-- ARMMCAsmInfo.cpp - ARM asm properties -----------------------------===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This file contains the declarations of the ARMMCAsmInfo properties.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "ARMMCAsmInfo.h"
|
|
#include "llvm/Support/CommandLine.h"
|
|
|
|
using namespace llvm;
|
|
|
|
void ARMMCAsmInfoDarwin::anchor() { }
|
|
|
|
ARMMCAsmInfoDarwin::ARMMCAsmInfoDarwin() {
|
|
Data64bitsDirective = 0;
|
|
CommentString = "@";
|
|
Code16Directive = ".code\t16";
|
|
Code32Directive = ".code\t32";
|
|
UseDataRegionDirectives = true;
|
|
|
|
SupportsDebugInformation = true;
|
|
|
|
// Exceptions handling
|
|
ExceptionsType = ExceptionHandling::SjLj;
|
|
|
|
UseIntegratedAssembler = true;
|
|
}
|
|
|
|
void ARMELFMCAsmInfo::anchor() { }
|
|
|
|
ARMELFMCAsmInfo::ARMELFMCAsmInfo() {
|
|
// ".comm align is in bytes but .align is pow-2."
|
|
AlignmentIsInBytes = false;
|
|
|
|
Data64bitsDirective = 0;
|
|
CommentString = "@";
|
|
Code16Directive = ".code\t16";
|
|
Code32Directive = ".code\t32";
|
|
|
|
HasLEB128 = true;
|
|
SupportsDebugInformation = true;
|
|
|
|
// Exceptions handling
|
|
ExceptionsType = ExceptionHandling::ARM;
|
|
|
|
// foo(plt) instead of foo@plt
|
|
UseParensForSymbolVariant = true;
|
|
|
|
UseIntegratedAssembler = true;
|
|
}
|
|
|
|
void ARMELFMCAsmInfo::setUseIntegratedAssembler(bool Value) {
|
|
UseIntegratedAssembler = Value;
|
|
if (!UseIntegratedAssembler) {
|
|
// gas doesn't handle VFP register names in cfi directives,
|
|
// so don't use register names with external assembler.
|
|
// See https://sourceware.org/bugzilla/show_bug.cgi?id=16694
|
|
DwarfRegNumForCFI = true;
|
|
}
|
|
}
|