LLVM  6.0.0svn
Macros | Functions | Variables
HexagonAsmParser.cpp File Reference
#include "Hexagon.h"
#include "HexagonTargetStreamer.h"
#include "MCTargetDesc/HexagonMCChecker.h"
#include "MCTargetDesc/HexagonMCELFStreamer.h"
#include "MCTargetDesc/HexagonMCExpr.h"
#include "MCTargetDesc/HexagonMCInstrInfo.h"
#include "MCTargetDesc/HexagonMCTargetDesc.h"
#include "MCTargetDesc/HexagonShuffler.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/Twine.h"
#include "llvm/BinaryFormat/ELF.h"
#include "llvm/MC/MCAssembler.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCDirectives.h"
#include "llvm/MC/MCELFStreamer.h"
#include "llvm/MC/MCExpr.h"
#include "llvm/MC/MCInst.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/MCSectionELF.h"
#include "llvm/MC/MCStreamer.h"
#include "llvm/MC/MCSubtargetInfo.h"
#include "llvm/MC/MCSymbol.h"
#include "llvm/MC/MCValue.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/SMLoc.h"
#include "llvm/Support/TargetRegistry.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <cassert>
#include <cctype>
#include <cstddef>
#include <cstdint>
#include <memory>
#include <string>
#include <utility>
#include "HexagonGenAsmMatcher.inc"
Include dependency graph for HexagonAsmParser.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "mcasmparser"
 
#define GET_MATCHER_IMPLEMENTATION
 
#define GET_REGISTER_MATCHER
 
Auto-generated Match Functions

{

#define GET_ASSEMBLER_HEADER
 

Functions

void LLVMInitializeHexagonAsmParser ()
 Force static initialization. More...
 
static bool previousEqual (OperandVector &Operands, size_t Index, StringRef String)
 
static bool previousIsLoop (OperandVector &Operands, size_t Index)
 
static MCInst makeCombineInst (int opCode, MCOperand &Rdd, MCOperand &MO1, MCOperand &MO2)
 

Variables

static cl::opt< boolEnableFutureRegs ("mfuture-regs", cl::desc("Enable future registers"))
 
static cl::opt< boolWarnMissingParenthesis ("mwarn-missing-parenthesis", cl::desc("Warn for missing parenthesis around predicate registers"), cl::init(true))
 
static cl::opt< boolErrorMissingParenthesis ("merror-missing-parenthesis", cl::desc("Error for missing parenthesis around predicate registers"), cl::init(false))
 
static cl::opt< boolWarnSignedMismatch ("mwarn-sign-mismatch", cl::desc("Warn for mismatching a signed and unsigned value"), cl::init(true))
 
static cl::opt< boolWarnNoncontigiousRegister ("mwarn-noncontigious-register", cl::desc("Warn for register names that arent contigious"), cl::init(true))
 
static cl::opt< boolErrorNoncontigiousRegister ("merror-noncontigious-register", cl::desc("Error for register names that aren't contigious"), cl::init(false))
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "mcasmparser"

Definition at line 10 of file HexagonAsmParser.cpp.

◆ GET_ASSEMBLER_HEADER

#define GET_ASSEMBLER_HEADER

Definition at line 149 of file HexagonAsmParser.cpp.

◆ GET_MATCHER_IMPLEMENTATION

#define GET_MATCHER_IMPLEMENTATION

Definition at line 826 of file HexagonAsmParser.cpp.

◆ GET_REGISTER_MATCHER

#define GET_REGISTER_MATCHER

Definition at line 827 of file HexagonAsmParser.cpp.

Function Documentation

◆ LLVMInitializeHexagonAsmParser()

void LLVMInitializeHexagonAsmParser ( )

Force static initialization.

Definition at line 822 of file HexagonAsmParser.cpp.

References llvm::getTheHexagonTarget(), and X.

◆ makeCombineInst()

static MCInst makeCombineInst ( int  opCode,
MCOperand Rdd,
MCOperand MO1,
MCOperand MO2 
)
static

Definition at line 1219 of file HexagonAsmParser.cpp.

References llvm::HexagonII::Absolute, llvm::MCInst::addOperand(), assert(), llvm::MCInst::clear(), llvm::HexagonISD::CONST32, Context, llvm::HexagonMCExpr::create(), llvm::MCConstantExpr::create(), llvm::MCSymbolRefExpr::create(), llvm::MCOperand::createExpr(), llvm::MCOperand::createReg(), llvm::MCBinaryExpr::createSub(), llvm::dbgs(), DEBUG, llvm::StringRef::drop_back(), llvm::format_hex(), llvm::MCRegisterInfo::getEncodingValue(), llvm::MCOperand::getExpr(), llvm::MCInst::getOpcode(), llvm::MCInst::getOperand(), llvm::MCOperand::getReg(), llvm::MCAsmParser::getStreamer(), llvm::MCStreamer::hasRawTextSupport(), llvm::Hi_32(), llvm::object::is32bit(), llvm::MCOperand::isExpr(), llvm::isInt< 8 >(), llvm::MCSymbol::isUndefined(), Kind, LLVM_FALLTHROUGH, llvm_unreachable, llvm::Lo_32(), llvm::StringRef::lower(), llvm::MatchRegisterAltName(), llvm::MatchRegisterName(), llvm::MCSA_Global, llvm::MCSA_Local, llvm::HexagonMCInstrInfo::mustExtend(), llvm::MCStreamer::PopSection(), llvm::MCAsmParser::printError(), llvm::MCStreamer::PushSection(), R2, llvm::MCOperand::setExpr(), llvm::HexagonMCInstrInfo::setMustExtend(), llvm::HexagonMCInstrInfo::setMustNotExtend(), llvm::MCInst::setOpcode(), llvm::MCOperand::setReg(), llvm::HexagonMCInstrInfo::setS27_2_reloc(), llvm::ELF::SHF_ALLOC, llvm::ELF::SHF_WRITE, llvm::ELF::SHT_PROGBITS, llvm::raw_string_ostream::str(), Success, llvm::MCStreamer::SwitchSection(), llvm::StringRef::upper(), llvm::utohexstr(), and llvm::utostr().

◆ previousEqual()

static bool previousEqual ( OperandVector Operands,
size_t  Index,
StringRef  String 
)
static

◆ previousIsLoop()

static bool previousIsLoop ( OperandVector Operands,
size_t  Index 
)
static

Definition at line 840 of file HexagonAsmParser.cpp.

References assert(), llvm::SmallVectorTemplateCommon< T >::back(), llvm::AsmToken::Colon, llvm::object::Comma, llvm::AsmToken::Comma, Context, llvm::HexagonMCExpr::create(), llvm::MCConstantExpr::create(), llvm::MCBinaryExpr::createAnd(), llvm::MCBinaryExpr::createLShr(), llvm::StringRef::data(), llvm::AsmToken::Dot, llvm::SmallVectorImpl< T >::emplace_back(), llvm::SmallVectorBase::empty(), llvm::StringRef::empty(), llvm::SmallVectorTemplateCommon< T, typename >::end(), llvm::SmallVectorTemplateCommon< T >::end(), llvm::WebAssembly::End, llvm::AsmToken::EndOfStatement, llvm::lltok::Eof, llvm::AsmToken::EqualEqual, llvm::StringRef::equals_lower(), llvm::lltok::Error, ErrorMissingParenthesis, ErrorNoncontigiousRegister, llvm::MCExpr::evaluateAsRelocatable(), llvm::AsmToken::ExclaimEqual, llvm::MCValue::getAccessVariant(), llvm::MCAsmParser::getContext(), llvm::AsmToken::getKind(), llvm::MCAsmParser::getLexer(), llvm::AsmToken::getLoc(), llvm::MCAsmLexer::getLoc(), llvm::AsmToken::getString(), llvm::MCAsmLexer::getTok(), llvm::MCAsmParser::getTok(), llvm::AsmToken::GreaterEqual, llvm::AsmToken::GreaterGreater, llvm::AsmToken::Hash, llvm::AsmToken::Identifier, llvm::object::Identifier, llvm::SmallVectorImpl< T >::insert(), llvm::AsmToken::Integer, llvm::AsmToken::is(), llvm::MCAsmLexer::is(), llvm::MCValue::isAbsolute(), llvm::AsmToken::LCurly, llvm::AsmToken::LessEqual, llvm::AsmToken::LessLess, llvm::MCAsmLexer::Lex(), llvm::StringRef::lower(), llvm::AsmToken::LParen, llvm::MCAsmLexer::peekTok(), llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::pop_back(), previousEqual(), llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), llvm::SmallVectorTemplateBase< T, isPodLike >::push_back(), llvm::AsmToken::RCurly, llvm::AsmToken::Real, Register, llvm::remove_if(), llvm::HexagonMCInstrInfo::setMustExtend(), llvm::HexagonMCInstrInfo::setMustNotExtend(), llvm::SmallVectorTemplateCommon< T >::size(), llvm::StringRef::size(), llvm::StringRef::split(), llvm::pdb::String, llvm::StringRef::substr(), llvm::MCAsmLexer::UnLex(), llvm::dwarf::syntax::Warning, WarnMissingParenthesis, and WarnNoncontigiousRegister.

Variable Documentation

◆ EnableFutureRegs

cl::opt<bool> EnableFutureRegs("mfuture-regs", cl::desc("Enable future registers"))
static

◆ ErrorMissingParenthesis

cl::opt<bool> ErrorMissingParenthesis("merror-missing-parenthesis", cl::desc("Error for missing parenthesis around predicate registers"), cl::init(false))
static

Referenced by previousIsLoop().

◆ ErrorNoncontigiousRegister

cl::opt<bool> ErrorNoncontigiousRegister("merror-noncontigious-register", cl::desc("Error for register names that aren't contigious"), cl::init(false))
static

Referenced by previousIsLoop().

◆ WarnMissingParenthesis

cl::opt<bool> WarnMissingParenthesis("mwarn-missing-parenthesis", cl::desc("Warn for missing parenthesis around predicate registers"), cl::init(true))
static

Referenced by previousIsLoop().

◆ WarnNoncontigiousRegister

cl::opt<bool> WarnNoncontigiousRegister("mwarn-noncontigious-register", cl::desc("Warn for register names that arent contigious"), cl::init(true))
static

Referenced by previousIsLoop().

◆ WarnSignedMismatch

cl::opt<bool> WarnSignedMismatch("mwarn-sign-mismatch", cl::desc("Warn for mismatching a signed and unsigned value"), cl::init(true))
static