LLVM  9.0.0svn
Namespaces | Macros | Enumerations | Functions | Variables
ARMAsmParser.cpp File Reference
#include "ARMFeatures.h"
#include "Utils/ARMBaseInfo.h"
#include "MCTargetDesc/ARMAddressingModes.h"
#include "MCTargetDesc/ARMBaseInfo.h"
#include "MCTargetDesc/ARMInstPrinter.h"
#include "MCTargetDesc/ARMMCExpr.h"
#include "MCTargetDesc/ARMMCTargetDesc.h"
#include "TargetInfo/ARMTargetInfo.h"
#include "llvm/ADT/APFloat.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/None.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/ADT/Triple.h"
#include "llvm/ADT/Twine.h"
#include "llvm/MC/MCContext.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/MCAsmParserExtension.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/MC/SubtargetFeature.h"
#include "llvm/Support/ARMBuildAttributes.h"
#include "llvm/Support/ARMEHABI.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/SMLoc.h"
#include "llvm/Support/TargetParser.h"
#include "llvm/Support/TargetRegistry.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <iterator>
#include <limits>
#include <memory>
#include <string>
#include <utility>
#include <vector>
#include "ARMGenAsmMatcher.inc"

Go to the source code of this file.

Namespaces

 llvm
 This class represents lattice values for constants.
 

Macros

#define DEBUG_TYPE   "asm-parser"
 
#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)
 

Variables

const MCInstrDesc llvm::ARMInsts []
 

Auto-generated Match Functions

{

#define GET_REGISTER_MATCHER
 
#define GET_SUBTARGET_FEATURE_NAME
 
#define GET_MATCHER_IMPLEMENTATION
 
#define GET_MNEMONIC_SPELL_CHECKER
 
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 bool isDataTypeToken (StringRef Tok)
 
static bool doesIgnoreDataTypeSuffix (StringRef Mnemonic, StringRef DT)
 
static void applyMnemonicAliases (StringRef &Mnemonic, const FeatureBitset &Features, unsigned VariantID)
 
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 int findFirstVectorPredOperandIdx (const MCInstrDesc &MCID)
 
static bool isVectorPredicable (const MCInstrDesc &MCID)
 
static unsigned getRealVSTOpcode (unsigned Opc, unsigned &Spacing)
 
static unsigned getRealVLDOpcode (unsigned Opc, unsigned &Spacing)
 
static std::string ARMMnemonicSpellCheck (StringRef S, const FeatureBitset &FBS, unsigned VariantID=0)
 
static const chargetSubtargetFeatureName (uint64_t Val)
 
void LLVMInitializeARMAsmParser ()
 Force static initialization. More...
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "asm-parser"

Definition at line 68 of file ARMAsmParser.cpp.

◆ GET_ASSEMBLER_HEADER

#define GET_ASSEMBLER_HEADER

Definition at line 542 of file ARMAsmParser.cpp.

◆ GET_MATCHER_IMPLEMENTATION

#define GET_MATCHER_IMPLEMENTATION

Definition at line 10936 of file ARMAsmParser.cpp.

◆ GET_MNEMONIC_SPELL_CHECKER

#define GET_MNEMONIC_SPELL_CHECKER

Definition at line 10937 of file ARMAsmParser.cpp.

◆ GET_OPERAND_DIAGNOSTIC_TYPES

#define GET_OPERAND_DIAGNOSTIC_TYPES

Definition at line 599 of file ARMAsmParser.cpp.

◆ GET_REGISTER_MATCHER

#define GET_REGISTER_MATCHER

Definition at line 10934 of file ARMAsmParser.cpp.

◆ GET_SUBTARGET_FEATURE_NAME

#define GET_SUBTARGET_FEATURE_NAME

Definition at line 10935 of file ARMAsmParser.cpp.

Enumeration Type Documentation

◆ ImplicitItModeTy

enum ImplicitItModeTy
strong

Definition at line 78 of file ARMAsmParser.cpp.

◆ VectorLaneTy

Definition at line 95 of file ARMAsmParser.cpp.

Function Documentation

◆ applyMnemonicAliases()

static void applyMnemonicAliases ( StringRef Mnemonic,
const FeatureBitset Features,
unsigned  VariantID 
)
static

◆ ARMMnemonicSpellCheck()

static std::string ARMMnemonicSpellCheck ( StringRef  S,
const FeatureBitset FBS,
unsigned  VariantID = 0 
)
static

◆ checkLowRegisterList()

static bool checkLowRegisterList ( const MCInst Inst,
unsigned  OpNo,
unsigned  Reg,
unsigned  HiReg,
bool containsReg 
)
static

◆ doesIgnoreDataTypeSuffix()

static bool doesIgnoreDataTypeSuffix ( StringRef  Mnemonic,
StringRef  DT 
)
static

◆ findFirstVectorPredOperandIdx()

static int findFirstVectorPredOperandIdx ( const MCInstrDesc MCID)
static

◆ getNextRegister()

static unsigned getNextRegister ( unsigned  Reg)
static

Definition at line 3978 of file ARMAsmParser.cpp.

References llvm::ARM_PROC::A, llvm::AsmToken::Caret, llvm::StringSwitch< T, R >::Case(), llvm::AsmToken::Comma, llvm::MCRegisterClass::contains(), contains(), llvm::ARM_TSB::CSYNC, llvm::StringSwitch< T, R >::Default(), llvm::AsmToken::Dollar, llvm::dyn_cast(), E, llvm::StringRef::equals_lower(), llvm::Error, llvm::ARM_PROC::F, llvm::AsmToken::getEndLoc(), llvm::MCRegisterClass::getID(), llvm::AsmToken::getIntVal(), llvm::AsmToken::getLoc(), llvm::AsmToken::getString(), llvm::MCAsmParser::getTok(), llvm::MCConstantExpr::getValue(), llvm::AsmToken::Hash, llvm::ARM_PROC::I, llvm::AsmToken::Identifier, llvm::AsmToken::Integer, llvm::AsmToken::is(), llvm::ARM_MB::ISH, llvm::ARM_MB::ISHLD, llvm::ARM_MB::ISHST, llvm::AsmToken::isNot(), llvm::AsmToken::LBrac, llvm::AsmToken::LCurly, llvm::ARM_MB::LD, llvm::MCAsmParser::Lex(), llvm_unreachable, llvm::StringRef::lower(), llvm::BitmaskEnumDetail::Mask(), llvm::MatchOperand_NoMatch, llvm::MatchOperand_ParseFail, llvm::MatchOperand_Success, llvm::AsmToken::Minus, MRI, llvm::ARM_MB::NSH, llvm::ARM_MB::NSHLD, llvm::ARM_MB::NSHST, llvm::ARM_MB::OSH, llvm::ARM_MB::OSHLD, llvm::ARM_MB::OSHST, llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::SmallVectorTemplateBase< T >::push_back(), R2, R4, R6, llvm::AsmToken::RBrac, llvm::AsmToken::RCurly, Reg, Registers, llvm::ARM_MB::RESERVED_0, llvm::ARM_ISB::RESERVED_0, llvm::StringRef::size(), llvm::StringRef::slice(), llvm::ARM_MB::ST, llvm::StringRef::substr(), llvm::ARM_MB::SY, llvm::ARM_ISB::SY, and llvm::Warning.

◆ getRealVLDOpcode()

static unsigned getRealVLDOpcode ( unsigned  Opc,
unsigned Spacing 
)
static

◆ getRealVSTOpcode()

static unsigned getRealVSTOpcode ( unsigned  Opc,
unsigned Spacing 
)
static

Definition at line 7420 of file ARMAsmParser.cpp.

References llvm_unreachable.

Referenced by getRealVLDOpcode().

◆ getSubtargetFeatureName()

static const char* getSubtargetFeatureName ( uint64_t  Val)
static

◆ instIsBreakpoint()

static bool instIsBreakpoint ( const MCInst Inst)
static

◆ isDataTypeToken()

static bool isDataTypeToken ( StringRef  Tok)
static

Definition at line 6320 of file ARMAsmParser.cpp.

◆ isVectorPredicable()

static bool isVectorPredicable ( const MCInstrDesc MCID)
static

◆ listContainsReg()

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

◆ LLVMInitializeARMAsmParser()

void LLVMInitializeARMAsmParser ( )

Force static initialization.

Definition at line 10927 of file ARMAsmParser.cpp.

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

◆ MatchCoprocessorOperandName()

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 3839 of file ARMAsmParser.cpp.

References llvm::ARMCondCodeFromString(), llvm::StringRef::drop_front(), llvm::dyn_cast(), E, llvm::Error, llvm::AsmToken::getEndLoc(), llvm::AsmToken::getLoc(), llvm::AsmToken::getString(), llvm::MCAsmParser::getTok(), llvm::MCConstantExpr::getValue(), llvm::AsmToken::Identifier, llvm::AsmToken::is(), llvm::AsmToken::isNot(), llvm::AsmToken::LCurly, llvm::MCAsmParser::Lex(), llvm::StringRef::lower(), llvm::MatchOperand_NoMatch, llvm::MatchOperand_ParseFail, llvm::MatchOperand_Success, llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::AsmToken::RCurly, Reg, and llvm::StringRef::size().

◆ MatchRegisterName()

static unsigned MatchRegisterName ( StringRef  Name)
static