LLVM  6.0.0svn
Macros
AArch64AsmParser.cpp File Reference
#include "MCTargetDesc/AArch64AddressingModes.h"
#include "MCTargetDesc/AArch64MCExpr.h"
#include "MCTargetDesc/AArch64MCTargetDesc.h"
#include "MCTargetDesc/AArch64TargetStreamer.h"
#include "Utils/AArch64BaseInfo.h"
#include "llvm/ADT/APFloat.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/ADT/Twine.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCExpr.h"
#include "llvm/MC/MCInst.h"
#include "llvm/MC/MCLinkerOptimizationHint.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/MCParsedAsmOperand.h"
#include "llvm/MC/MCParser/MCTargetAsmParser.h"
#include "llvm/MC/MCRegisterInfo.h"
#include "llvm/MC/MCStreamer.h"
#include "llvm/MC/MCSubtargetInfo.h"
#include "llvm/MC/MCSymbol.h"
#include "llvm/MC/MCTargetOptions.h"
#include "llvm/MC/SubtargetFeature.h"
#include "llvm/Support/Casting.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 <cassert>
#include <cctype>
#include <cstdint>
#include <cstdio>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
#include "AArch64GenAsmMatcher.inc"
Include dependency graph for AArch64AsmParser.cpp:

Go to the source code of this file.

Macros

#define GET_OPERAND_DIAGNOSTIC_TYPES
 
Auto-generated Match Functions

{

#define GET_ASSEMBLER_HEADER
 

Auto-generated Match Functions

{

#define GET_REGISTER_MATCHER
 
#define GET_SUBTARGET_FEATURE_NAME
 
#define GET_MATCHER_IMPLEMENTATION
 
struct {
   const char *   Name
 
   const FeatureBitset   Features
 
ExtensionMap []
 
static unsigned MatchRegisterName (StringRef Name)
 
static unsigned matchVectorRegName (StringRef Name)
 } More...
 
static bool isValidVectorKind (StringRef Name)
 
static void parseValidVectorKind (StringRef Name, unsigned &NumElements, char &ElementKind)
 
static void setRequiredFeatureString (FeatureBitset FBS, std::string &Str)
 
std::string AArch64MnemonicSpellCheck (StringRef S, uint64_t FBS)
 
static const chargetSubtargetFeatureName (uint64_t Val)
 
static SMLoc incrementLoc (SMLoc L, int Offset)
 
void LLVMInitializeAArch64AsmParser ()
 Force static initialization. More...
 

Macro Definition Documentation

◆ GET_ASSEMBLER_HEADER

#define GET_ASSEMBLER_HEADER

Definition at line 112 of file AArch64AsmParser.cpp.

◆ GET_MATCHER_IMPLEMENTATION

#define GET_MATCHER_IMPLEMENTATION

Definition at line 4257 of file AArch64AsmParser.cpp.

◆ GET_OPERAND_DIAGNOSTIC_TYPES

#define GET_OPERAND_DIAGNOSTIC_TYPES

Definition at line 135 of file AArch64AsmParser.cpp.

◆ GET_REGISTER_MATCHER

#define GET_REGISTER_MATCHER

Definition at line 4255 of file AArch64AsmParser.cpp.

◆ GET_SUBTARGET_FEATURE_NAME

#define GET_SUBTARGET_FEATURE_NAME

Definition at line 4256 of file AArch64AsmParser.cpp.

Function Documentation

◆ AArch64MnemonicSpellCheck()

std::string AArch64MnemonicSpellCheck ( StringRef  S,
uint64_t  FBS 
)

◆ getSubtargetFeatureName()

static const char* getSubtargetFeatureName ( uint64_t  Val)
static

◆ incrementLoc()

static SMLoc incrementLoc ( SMLoc  L,
int  Offset 
)
static

Definition at line 3963 of file AArch64AsmParser.cpp.

References llvm::MCBinaryExpr::Add, llvm::MCInst::addOperand(), llvm::AMDGPU::HSAMD::Kernel::Key::Args, assert(), llvm::AsmToken::Comma, llvm::AArch64MCExpr::create(), llvm::MCSymbolRefExpr::create(), llvm::MCOperand::createExpr(), llvm::dyn_cast(), llvm::StringRef::empty(), llvm::AsmToken::EndOfStatement, llvm::StringMap< ValueTy, AllocatorTy >::erase(), llvm::lltok::Error, ExtensionMap, Features, llvm::MCSubtargetInfo::getFeatureBits(), llvm::SMLoc::getFromPointer(), llvm::AsmToken::getIdentifier(), llvm::MCSymbolRefExpr::getKind(), llvm::MCBinaryExpr::getLHS(), llvm::MCBinaryExpr::getOpcode(), llvm::SMLoc::getPointer(), llvm::MCBinaryExpr::getRHS(), llvm::MCAsmParser::getTok(), llvm::MCConstantExpr::getValue(), llvm::AsmToken::Identifier, llvm::StringMap< ValueTy, AllocatorTy >::insert(), llvm::AsmToken::Integer, llvm::isValidMCLOHType(), Kind, llvm::MCAsmParser::Lex(), llvm::StringRef::lower(), llvm::MCLOHIdToNbArgs(), llvm::MCLOHNameToId(), Name, llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), llvm::report_fatal_error(), llvm::MCSubtargetInfo::setDefaultFeatures(), llvm::MCInst::setOpcode(), llvm::StringRef::size(), llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Size, llvm::StringRef::split(), llvm::StringRef::startswith_lower(), llvm::MCBinaryExpr::Sub, llvm::StringRef::substr(), llvm::MCSubtargetInfo::ToggleFeature(), llvm::StringRef::trim(), llvm::AArch64MCExpr::VK_INVALID, llvm::MCSymbolRefExpr::VK_None, llvm::AArch64MCExpr::VK_TLSDESC, and llvm::dwarf::syntax::Warning.

◆ isValidVectorKind()

static bool isValidVectorKind ( StringRef  Name)
static

Definition at line 1831 of file AArch64AsmParser.cpp.

Referenced by parseValidVectorKind().

◆ LLVMInitializeAArch64AsmParser()

void LLVMInitializeAArch64AsmParser ( )

Force static initialization.

Definition at line 4249 of file AArch64AsmParser.cpp.

References llvm::getTheAArch64beTarget(), llvm::getTheAArch64leTarget(), llvm::getTheARM64Target(), X, Y, and llvm::Z.

◆ MatchRegisterName()

static unsigned MatchRegisterName ( StringRef  Name)
static

Referenced by addNegOperand().

◆ matchVectorRegName()

static unsigned matchVectorRegName ( StringRef  Name)
static

}

Definition at line 1794 of file AArch64AsmParser.cpp.

◆ parseValidVectorKind()

static void parseValidVectorKind ( StringRef  Name,
unsigned NumElements,
char ElementKind 
)
static

Definition at line 1856 of file AArch64AsmParser.cpp.

References llvm::AArch64CC::AL, llvm::AArch64_AM::ASR, assert(), llvm::StringSwitch< T, R >::Case(), llvm::APFloat::changeSign(), llvm::AsmToken::Comma, llvm::AArch64MCExpr::create(), llvm::MCConstantExpr::create(), llvm::StringSwitch< T, R >::Default(), llvm::StringRef::drop_front(), llvm::dyn_cast(), E, llvm::AArch64CC::EQ, llvm::StringRef::equals_lower(), llvm::lltok::Error, llvm::StringRef::find(), llvm::AArch64CC::GE, llvm::StringRef::getAsInteger(), llvm::AArch64_AM::getFP64Imm(), llvm::SMLoc::getFromPointer(), llvm::AsmToken::getIdentifier(), llvm::AsmToken::getIntVal(), llvm::AArch64CC::getInvertedCondCode(), llvm::AsmToken::getLoc(), llvm::AsmToken::getString(), llvm::MCAsmParser::getTok(), llvm::MCConstantExpr::getValue(), llvm::AArch64CC::GT, llvm::AsmToken::Hash, llvm::AArch64CC::HI, llvm::AArch64CC::HS, llvm::AsmToken::Identifier, llvm::APFloatBase::IEEEdouble(), llvm::AsmToken::Integer, llvm::tgtok::IntVal, llvm::AArch64CC::Invalid, llvm::AArch64_AM::InvalidShiftExtend, llvm::AsmToken::is(), llvm::AsmToken::isNot(), isValidVectorKind(), Kind, llvm::AArch64CC::LE, llvm::MCAsmParser::Lex(), llvm::AArch64CC::LO, llvm::StringRef::lower(), llvm::AsmToken::LParen, llvm::AArch64CC::LS, llvm::AArch64_AM::LSL, llvm::AArch64_AM::LSR, llvm::AArch64CC::LT, llvm::MatchOperand_NoMatch, llvm::MatchOperand_ParseFail, llvm::MatchOperand_Success, llvm::AArch64CC::MI, llvm::AsmToken::Minus, llvm::AArch64_AM::MSL, Name, llvm::AArch64CC::NE, llvm::StringRef::npos, llvm::AArch64CC::NV, llvm::AArch64CC::PL, llvm::SmallVectorTemplateBase< T, isPodLike >::push_back(), llvm::AsmToken::Real, llvm::AArch64_AM::ROR, llvm::StringRef::slice(), llvm::StringRef::startswith(), llvm::AArch64_AM::SXTB, llvm::AArch64_AM::SXTH, llvm::AArch64_AM::SXTW, llvm::AArch64_AM::SXTX, llvm::AArch64_AM::UXTB, llvm::AArch64_AM::UXTH, llvm::AArch64_AM::UXTW, llvm::AArch64_AM::UXTX, llvm::AArch64CC::VC, llvm::AArch64MCExpr::VK_ABS_PAGE, llvm::AArch64MCExpr::VK_GOT_PAGE, llvm::MCSymbolRefExpr::VK_GOTPAGE, llvm::AArch64MCExpr::VK_GOTTPREL_PAGE, llvm::AArch64MCExpr::VK_INVALID, llvm::MCSymbolRefExpr::VK_None, llvm::MCSymbolRefExpr::VK_PAGE, llvm::AArch64MCExpr::VK_TLSDESC_PAGE, llvm::MCSymbolRefExpr::VK_TLVPPAGE, and llvm::AArch64CC::VS.

Referenced by setRequiredFeatureString().

◆ setRequiredFeatureString()

static void setRequiredFeatureString ( FeatureBitset  FBS,
std::string &  Str 
)
static

Definition at line 2373 of file AArch64AsmParser.cpp.

References AArch64MnemonicSpellCheck(), assert(), llvm::SmallVectorTemplateCommon< T >::back(), llvm::SmallVectorTemplateCommon< T, typename >::back(), llvm::StringSwitch< T, R >::Case(), llvm::AsmToken::Colon, llvm::AsmToken::Comma, llvm::MCRegisterClass::contains(), contains(), llvm::countTrailingZeros(), llvm::AArch64MCExpr::create(), llvm::MCConstantExpr::create(), llvm::StringRef::data(), DC, llvm::StringSwitch< T, R >::Default(), llvm::dyn_cast(), E, llvm::MCStreamer::EmitInstruction(), llvm::SmallVectorBase::empty(), llvm::StringRef::empty(), llvm::SysAlias::Encoding, llvm::AsmToken::EndOfStatement, llvm::AsmToken::Equal, llvm::lltok::Error, llvm::AsmToken::Exclaim, llvm::StringRef::find(), llvm::Format, llvm::MCOperand::getExpr(), llvm::SMLoc::getFromPointer(), llvm::AsmToken::getIdentifier(), llvm::MCAsmParser::getLexer(), llvm::AsmToken::getLoc(), llvm::MCInst::getOpcode(), llvm::MCInst::getOperand(), llvm::SMLoc::getPointer(), llvm::MCOperand::getReg(), getReg(), llvm::MCRegisterInfo::getRegClass(), llvm::SysAlias::getRequiredFeatures(), llvm::AsmToken::getString(), getSubtargetFeatureName(), llvm::MCAsmParser::getTok(), llvm::getToken(), llvm::MCConstantExpr::getValue(), llvm::getWRegFromXReg(), llvm::getXRegFromWReg(), llvm::AsmToken::Hash, llvm::SysAlias::haveFeatures(), llvm::AsmToken::Identifier, llvm::APFloatBase::IEEEdouble(), llvm::AsmToken::Integer, llvm::tgtok::IntVal, llvm::AArch64CC::Invalid, llvm::AsmToken::is(), llvm::MCObjectFileInfo::IsCOFF, llvm::MCOperand::isExpr(), llvm::APInt::isIntN(), llvm::MCObjectFileInfo::IsMachO, llvm::AsmToken::isNot(), isReg(), llvm::APInt::isSignedIntN(), llvm::MCRegisterInfo::isSubRegisterEq(), Kind, llvm::AsmToken::LBrac, llvm::AsmToken::LCurly, llvm::MCAsmParser::Lex(), LLVM_FALLTHROUGH, llvm_unreachable, llvm::AArch64SysReg::lookupSysRegByName(), llvm::StringRef::lower(), llvm::AArch64_AM::LSL, llvm::BitmaskEnumDetail::Mask(), llvm::MatchOperand_NoMatch, llvm::MatchOperand_ParseFail, llvm::MatchOperand_Success, llvm::MCLOHDirectiveName(), llvm::AsmToken::Minus, N, llvm::SysAlias::Name, Name, llvm::StringRef::npos, llvm::MCAsmParser::parseExpression(), llvm::AArch64SysReg::parseGenericRegister(), parseValidVectorKind(), llvm::MCAsmLexer::peekTok(), llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), llvm::SmallVectorTemplateBase< T, isPodLike >::push_back(), llvm::AsmToken::RBrac, llvm::AsmToken::RCurly, llvm::AArch64SysReg::SysReg::Readable, llvm::AsmToken::Real, llvm::SmallVectorTemplateCommon< T, typename >::size(), llvm::StringRef::slice(), llvm::AArch64MCExpr::VK_ABS_G0, llvm::AArch64MCExpr::VK_ABS_G0_NC, llvm::AArch64MCExpr::VK_ABS_G0_S, llvm::AArch64MCExpr::VK_ABS_G1, llvm::AArch64MCExpr::VK_ABS_G1_NC, llvm::AArch64MCExpr::VK_ABS_G1_S, llvm::AArch64MCExpr::VK_ABS_G2, llvm::AArch64MCExpr::VK_ABS_G2_NC, llvm::AArch64MCExpr::VK_ABS_G2_S, llvm::AArch64MCExpr::VK_ABS_G3, llvm::AArch64MCExpr::VK_DTPREL_G0, llvm::AArch64MCExpr::VK_DTPREL_G0_NC, llvm::AArch64MCExpr::VK_DTPREL_G1, llvm::AArch64MCExpr::VK_DTPREL_G1_NC, llvm::AArch64MCExpr::VK_DTPREL_G2, llvm::AArch64MCExpr::VK_DTPREL_HI12, llvm::AArch64MCExpr::VK_DTPREL_LO12, llvm::AArch64MCExpr::VK_DTPREL_LO12_NC, llvm::AArch64MCExpr::VK_GOT_LO12, llvm::AArch64MCExpr::VK_GOT_PAGE, llvm::AArch64MCExpr::VK_GOTTPREL_G0_NC, llvm::AArch64MCExpr::VK_GOTTPREL_G1, llvm::AArch64MCExpr::VK_GOTTPREL_LO12_NC, llvm::AArch64MCExpr::VK_GOTTPREL_PAGE, llvm::AArch64MCExpr::VK_INVALID, llvm::AArch64MCExpr::VK_LO12, llvm::MCSymbolRefExpr::VK_PAGEOFF, llvm::AArch64MCExpr::VK_TLSDESC_LO12, llvm::AArch64MCExpr::VK_TLSDESC_PAGE, llvm::MCSymbolRefExpr::VK_TLVPPAGEOFF, llvm::AArch64MCExpr::VK_TPREL_G0, llvm::AArch64MCExpr::VK_TPREL_G0_NC, llvm::AArch64MCExpr::VK_TPREL_G1, llvm::AArch64MCExpr::VK_TPREL_G1_NC, llvm::AArch64MCExpr::VK_TPREL_G2, llvm::AArch64MCExpr::VK_TPREL_HI12, llvm::AArch64MCExpr::VK_TPREL_LO12, and llvm::AArch64MCExpr::VK_TPREL_LO12_NC.

Variable Documentation

◆ ExtensionMap

const { ... } ExtensionMap[]
Initial value:
= {
{ "crc", {AArch64::FeatureCRC} },
{ "crypto", {AArch64::FeatureCrypto} },
{ "fp", {AArch64::FeatureFPARMv8} },
{ "simd", {AArch64::FeatureNEON} },
{ "ras", {AArch64::FeatureRAS} },
{ "lse", {AArch64::FeatureLSE} },
{ "pan", {} },
{ "lor", {} },
{ "rdma", {} },
{ "profile", {} },
}

Referenced by incrementLoc().

◆ Features

const FeatureBitset Features

◆ Name

const char* Name