#include "MCTargetDesc/VEMCExpr.h"
#include "MCTargetDesc/VEMCTargetDesc.h"
#include "TargetInfo/VETargetInfo.h"
#include "VE.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/Twine.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCExpr.h"
#include "llvm/MC/MCInst.h"
#include "llvm/MC/MCInstrInfo.h"
#include "llvm/MC/MCParser/MCAsmLexer.h"
#include "llvm/MC/MCParser/MCAsmParser.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/TargetRegistry.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <memory>
usingnamespacellvm;
#define DEBUG_TYPE …
namespace {
class VEOperand;
class VEAsmParser : public MCTargetAsmParser { … };
}
static const MCPhysReg I32Regs[64] = …;
static const MCPhysReg F32Regs[64] = …;
static const MCPhysReg F128Regs[32] = …;
static const MCPhysReg VM512Regs[8] = …;
static const MCPhysReg MISCRegs[31] = …;
namespace {
class VEOperand : public MCParsedAsmOperand { … };
}
bool VEAsmParser::matchAndEmitInstruction(SMLoc IDLoc, unsigned &Opcode,
OperandVector &Operands,
MCStreamer &Out, uint64_t &ErrorInfo,
bool MatchingInlineAsm) { … }
bool VEAsmParser::parseRegister(MCRegister &Reg, SMLoc &StartLoc,
SMLoc &EndLoc) { … }
int VEAsmParser::parseRegisterName(MCRegister (*matchFn)(StringRef)) { … }
static MCRegister MatchRegisterName(StringRef Name);
static MCRegister MatchRegisterAltName(StringRef Name);
ParseStatus VEAsmParser::tryParseRegister(MCRegister &Reg, SMLoc &StartLoc,
SMLoc &EndLoc) { … }
static StringRef parseCC(StringRef Name, unsigned Prefix, unsigned Suffix,
bool IntegerCC, bool OmitCC, SMLoc NameLoc,
OperandVector *Operands) { … }
static StringRef parseRD(StringRef Name, unsigned Prefix, SMLoc NameLoc,
OperandVector *Operands) { … }
StringRef VEAsmParser::splitMnemonic(StringRef Name, SMLoc NameLoc,
OperandVector *Operands) { … }
static void applyMnemonicAliases(StringRef &Mnemonic,
const FeatureBitset &Features,
unsigned VariantID);
bool VEAsmParser::parseInstruction(ParseInstructionInfo &Info, StringRef Name,
SMLoc NameLoc, OperandVector &Operands) { … }
ParseStatus VEAsmParser::parseDirective(AsmToken DirectiveID) { … }
bool VEAsmParser::parseLiteralValues(unsigned Size, SMLoc L) { … }
const MCExpr *
VEAsmParser::extractModifierFromExpr(const MCExpr *E,
VEMCExpr::VariantKind &Variant) { … }
const MCExpr *VEAsmParser::fixupVariantKind(const MCExpr *E) { … }
bool VEAsmParser::parseExpression(const MCExpr *&EVal) { … }
ParseStatus VEAsmParser::parseMEMOperand(OperandVector &Operands) { … }
ParseStatus VEAsmParser::parseMEMAsOperand(OperandVector &Operands) { … }
ParseStatus VEAsmParser::parseMImmOperand(OperandVector &Operands) { … }
ParseStatus VEAsmParser::parseOperand(OperandVector &Operands,
StringRef Mnemonic) { … }
ParseStatus VEAsmParser::parseVEAsmOperand(std::unique_ptr<VEOperand> &Op) { … }
extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeVEAsmParser() { … }
#define GET_REGISTER_MATCHER
#define GET_MATCHER_IMPLEMENTATION
#include "VEGenAsmMatcher.inc"
unsigned VEAsmParser::validateTargetOperandClass(MCParsedAsmOperand &GOp,
unsigned Kind) { … }