LLVM  5.0.0
Namespaces | Macros | Enumerations | Functions
ARMAsmParser.cpp File Reference
#include "ARMFeatures.h"
#include "MCTargetDesc/ARMAddressingModes.h"
#include "MCTargetDesc/ARMBaseInfo.h"
#include "MCTargetDesc/ARMMCExpr.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/ADT/Triple.h"
#include "llvm/ADT/Twine.h"
#include "llvm/BinaryFormat/COFF.h"
#include "llvm/BinaryFormat/ELF.h"
#include "llvm/MC/MCAsmInfo.h"
#include "llvm/MC/MCAssembler.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCDisassembler/MCDisassembler.h"
#include "llvm/MC/MCELFStreamer.h"
#include "llvm/MC/MCExpr.h"
#include "llvm/MC/MCInst.h"
#include "llvm/MC/MCInstrDesc.h"
#include "llvm/MC/MCInstrInfo.h"
#include "llvm/MC/MCObjectFileInfo.h"
#include "llvm/MC/MCParser/MCAsmLexer.h"
#include "llvm/MC/MCParser/MCAsmParser.h"
#include "llvm/MC/MCParser/MCAsmParserUtils.h"
#include "llvm/MC/MCParser/MCParsedAsmOperand.h"
#include "llvm/MC/MCParser/MCTargetAsmParser.h"
#include "llvm/MC/MCRegisterInfo.h"
#include "llvm/MC/MCSection.h"
#include "llvm/MC/MCStreamer.h"
#include "llvm/MC/MCSubtargetInfo.h"
#include "llvm/MC/MCSymbol.h"
#include "llvm/Support/ARMBuildAttributes.h"
#include "llvm/Support/ARMEHABI.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/SourceMgr.h"
#include "llvm/Support/TargetParser.h"
#include "llvm/Support/TargetRegistry.h"
#include "llvm/Support/raw_ostream.h"
#include "ARMGenAsmMatcher.inc"
Include dependency graph for ARMAsmParser.cpp:

Go to the source code of this file.

Namespaces

 llvm
 Compute iterated dominance frontiers using a linear time algorithm.
 

Macros

#define GET_OPERAND_DIAGNOSTIC_TYPES
 
Auto-generated Match Functions

{

#define GET_ASSEMBLER_HEADER
 

Enumerations

enum  ImplicitItModeTy
 
enum  VectorLaneTy
 

Functions

template<>
bool llvm::IsCPSRDead< MCInst > (const MCInst *Instr)
 

Auto-generated Match Functions

{

#define GET_REGISTER_MATCHER
 
#define GET_SUBTARGET_FEATURE_NAME
 
#define GET_MATCHER_IMPLEMENTATION
 
struct {
   const unsigned   Kind
 
   const uint64_t   ArchCheck
 
   const FeatureBitset   Features
 
} Extensions []
 
static unsigned MatchRegisterName (StringRef Name)
 
static int MatchCoprocessorOperandName (StringRef Name, char CoprocOp)
 MatchCoprocessorOperandName - Try to parse an coprocessor related instruction with a symbolic operand name. More...
 
static unsigned getNextRegister (unsigned Reg)
 
static unsigned getDRegFromQReg (unsigned QReg)
 
static bool isDataTypeToken (StringRef Tok)
 
static bool doesIgnoreDataTypeSuffix (StringRef Mnemonic, StringRef DT)
 
static void applyMnemonicAliases (StringRef &Mnemonic, uint64_t Features, unsigned VariantID)
 
static bool RequiresVFPRegListValidation (StringRef Inst, bool &AcceptSinglePrecisionOnly, bool &AcceptDoublePrecisionOnly)
 
static bool checkLowRegisterList (const MCInst &Inst, unsigned OpNo, unsigned Reg, unsigned HiReg, bool &containsReg)
 
static bool listContainsReg (const MCInst &Inst, unsigned OpNo, unsigned Reg)
 
static bool instIsBreakpoint (const MCInst &Inst)
 
static unsigned getRealVSTOpcode (unsigned Opc, unsigned &Spacing)
 
static unsigned getRealVLDOpcode (unsigned Opc, unsigned &Spacing)
 
std::string ARMMnemonicSpellCheck (StringRef S, uint64_t FBS)
 
static const char * getSubtargetFeatureName (uint64_t Val)
 
void LLVMInitializeARMAsmParser ()
 Force static initialization. More...
 

Macro Definition Documentation

#define GET_ASSEMBLER_HEADER

Definition at line 478 of file ARMAsmParser.cpp.

#define GET_MATCHER_IMPLEMENTATION

Definition at line 10198 of file ARMAsmParser.cpp.

#define GET_OPERAND_DIAGNOSTIC_TYPES

Definition at line 530 of file ARMAsmParser.cpp.

#define GET_REGISTER_MATCHER

Definition at line 10196 of file ARMAsmParser.cpp.

#define GET_SUBTARGET_FEATURE_NAME

Definition at line 10197 of file ARMAsmParser.cpp.

Enumeration Type Documentation

enum ImplicitItModeTy
strong

Definition at line 56 of file ARMAsmParser.cpp.

Definition at line 75 of file ARMAsmParser.cpp.

Function Documentation

static void applyMnemonicAliases ( StringRef &  Mnemonic,
uint64_t  Features,
unsigned  VariantID 
)
static
std::string ARMMnemonicSpellCheck ( StringRef  S,
uint64_t  FBS 
)
static bool checkLowRegisterList ( const MCInst &  Inst,
unsigned  OpNo,
unsigned  Reg,
unsigned  HiReg,
bool &  containsReg 
)
static
static bool doesIgnoreDataTypeSuffix ( StringRef  Mnemonic,
StringRef  DT 
)
static

Definition at line 5824 of file ARMAsmParser.cpp.

References llvm::StringRef::startswith().

static unsigned getDRegFromQReg ( unsigned  QReg)
static

Definition at line 3465 of file ARMAsmParser.cpp.

References llvm_unreachable().

static unsigned getNextRegister ( unsigned  Reg)
static

Definition at line 3445 of file ARMAsmParser.cpp.

References contains(), llvm_unreachable(), R2, R4, and R6.

static unsigned getRealVLDOpcode ( unsigned  Opc,
unsigned &  Spacing 
)
static

Definition at line 6714 of file ARMAsmParser.cpp.

References llvm_unreachable().

static unsigned getRealVSTOpcode ( unsigned  Opc,
unsigned &  Spacing 
)
static

Definition at line 6605 of file ARMAsmParser.cpp.

References llvm_unreachable().

static const char* getSubtargetFeatureName ( uint64_t  Val)
static
static bool instIsBreakpoint ( const MCInst &  Inst)
static

Definition at line 6161 of file ARMAsmParser.cpp.

References llvm::MCInst::getOpcode().

static bool isDataTypeToken ( StringRef  Tok)
static

Definition at line 5812 of file ARMAsmParser.cpp.

static bool listContainsReg ( const MCInst &  Inst,
unsigned  OpNo,
unsigned  Reg 
)
static
void LLVMInitializeARMAsmParser ( )

Force static initialization.

Definition at line 10189 of file ARMAsmParser.cpp.

References A, B, llvm::getTheARMBETarget(), llvm::getTheARMLETarget(), llvm::getTheThumbBETarget(), llvm::getTheThumbLETarget(), X, and Y.

static int MatchCoprocessorOperandName ( StringRef  Name,
char  CoprocOp 
)
static

MatchCoprocessorOperandName - Try to parse an coprocessor related instruction with a symbolic operand name.

We accept "crN" syntax for GAS compatibility. <operand-name> ::= <prefix><number> If CoprocOp is 'c', then: <prefix> ::= c | cr If CoprocOp is 'p', then : <prefix> ::= p <number> ::= integer in range [0, 15]

Definition at line 3288 of file ARMAsmParser.cpp.

References llvm::StringRef::drop_front(), and llvm::StringRef::size().

static unsigned MatchRegisterName ( StringRef  Name)
static
static bool RequiresVFPRegListValidation ( StringRef  Inst,
bool &  AcceptSinglePrecisionOnly,
bool &  AcceptDoublePrecisionOnly 
)
static

Variable Documentation

const uint64_t ArchCheck

Definition at line 10206 of file ARMAsmParser.cpp.

const { ... } Extensions[]
Initial value:
= {
{ ARM::AEK_CRC, Feature_HasV8, {ARM::FeatureCRC} },
{ ARM::AEK_CRYPTO, Feature_HasV8,
{ARM::FeatureCrypto, ARM::FeatureNEON, ARM::FeatureFPARMv8} },
{ ARM::AEK_FP, Feature_HasV8, {ARM::FeatureFPARMv8} },
{ (ARM::AEK_HWDIVTHUMB | ARM::AEK_HWDIVARM), Feature_HasV7 | Feature_IsNotMClass,
{ARM::FeatureHWDivThumb, ARM::FeatureHWDivARM} },
{ ARM::AEK_MP, Feature_HasV7 | Feature_IsNotMClass, {ARM::FeatureMP} },
{ ARM::AEK_SIMD, Feature_HasV8, {ARM::FeatureNEON, ARM::FeatureFPARMv8} },
{ ARM::AEK_SEC, Feature_HasV6K, {ARM::FeatureTrustZone} },
{ ARM::AEK_VIRT, Feature_HasV7, {ARM::FeatureVirtualization} },
{ ARM::AEK_FP16, Feature_HasV8_2a, {ARM::FeatureFPARMv8, ARM::FeatureFullFP16} },
{ ARM::AEK_RAS, Feature_HasV8, {ARM::FeatureRAS} },
{ ARM::AEK_OS, Feature_None, {} },
{ ARM::AEK_IWMMXT, Feature_None, {} },
{ ARM::AEK_IWMMXT2, Feature_None, {} },
{ ARM::AEK_MAVERICK, Feature_None, {} },
{ ARM::AEK_XSCALE, Feature_None, {} },
}
const FeatureBitset Features

Definition at line 10207 of file ARMAsmParser.cpp.

Definition at line 10205 of file ARMAsmParser.cpp.

Referenced by llvm::AttrBuilder::addAttribute(), addForcedAttributes(), llvm::ScheduleDAGInstrs::addPhysRegDeps(), llvm::SIScheduleBlock::addSucc(), adjustFixupValue(), llvm::AVRAsmBackend::adjustFixupValue(), llvm::ARMAsmBackend::adjustFixupValue(), llvm::MipsAsmBackend::applyFixup(), llvm::combineMetadata(), llvm::MCObjectStreamer::EmitRelocDirective(), llvm::rdf::DeadCodeElimination::erase(), llvm::TargetLowering::expandMUL(), llvm::pdb::NativeSession::findSymbolByTypeIndex(), llvm::CodeViewYAML::detail::UnknownSymbolRecord::fromCodeViewSymbol(), llvm::AttributeSetNode::get(), llvm::MCValue::getAccessVariant(), llvm::X86AsmPrinter::GetCPISymbol(), llvm::MCContext::getELFSection(), llvm::MipsMCCodeEmitter::getExprOpValue(), llvm::MCAsmBackend::getFixupKindInfo(), llvm::FrameEntry::getKind(), llvm::MCFragment::getKind(), llvm::InstrProfRecord::getNumValueKinds(), llvm::codeview::TypeHasher::getOrCreateRecord(), llvm::MipsRegisterInfo::getPointerRegClass(), llvm::TargetLoweringObjectFileCOFF::getSectionForJumpTable(), llvm::PseudoSourceValue::getTargetCustom(), llvm::codeview::TypeTableCollection::getType(), llvm::MCContext::getWasmSection(), handleFieldList(), llvm::AttributeImpl::hasAttribute(), llvm::AttributeSetNode::hasAttribute(), llvm::AttributeListImpl::hasFnAttribute(), llvm::GCNRegPressure::inc(), llvm::rdf::DataFlowGraph::IsCode(), llvm::PseudoSourceValue::isConstantPool(), llvm::MCFragment::isDummy(), llvm::PseudoSourceValue::isGOT(), llvm::PseudoSourceValue::isJumpTable(), llvm::rdf::DataFlowGraph::IsRef(), llvm::PseudoSourceValue::isStack(), llvm::CallInst::isTailCall(), llvm::PseudoSourceValue::kind(), loadELF64(), llvm::SystemZMCInstLower::lowerOperand(), LowerSymbolOperand(), llvm::LanaiMCInstLower::LowerSymbolOperand(), maybeLexIntegerOrScalarType(), maybeLexSymbol(), llvm::codeview::MemberAttributes::MemberAttributes(), llvm::InstrProfRecord::merge(), llvm::VarStreamArrayExtractor< codeview::CVRecord< Kind > >::operator()(), llvm::rdf::operator<<(), llvm::yaml::MachineJumpTable::operator==(), llvm::opt::OptTable::OptTable(), llvm::DWARFDebugLocDWO::parse(), parseAttrKind(), llvm::MetadataLoader::MetadataLoaderImpl::parseMetadataAttachment(), printExpr(), llvm::PrintMessage(), llvm::propagateMetadata(), llvm::MIRParserImpl::reportDiagnostic(), llvm::InstrProfRecord::scale(), llvm::MCAssembler::setVersionMinInfo(), llvm::InstrProfRecord::sortValueData(), llvm::CodeViewYAML::detail::LeafRecordImpl< T >::toCodeViewRecord(), llvm::CodeViewYAML::detail::UnknownSymbolRecord::toCodeViewSymbol(), llvm::codeview::CVRecord< TypeLeafKind >::valid(), and llvm::codeview::visitMemberRecord().