#include "AVR.h"
#include "AVRRegisterInfo.h"
#include "MCTargetDesc/AVRMCELFStreamer.h"
#include "MCTargetDesc/AVRMCExpr.h"
#include "MCTargetDesc/AVRMCTargetDesc.h"
#include "TargetInfo/AVRTargetInfo.h"
#include "llvm/ADT/APInt.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCExpr.h"
#include "llvm/MC/MCInst.h"
#include "llvm/MC/MCInstBuilder.h"
#include "llvm/MC/MCParser/MCAsmLexer.h"
#include "llvm/MC/MCParser/MCParsedAsmOperand.h"
#include "llvm/MC/MCParser/MCTargetAsmParser.h"
#include "llvm/MC/MCStreamer.h"
#include "llvm/MC/MCSubtargetInfo.h"
#include "llvm/MC/MCSymbol.h"
#include "llvm/MC/MCValue.h"
#include "llvm/MC/TargetRegistry.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/MathExtras.h"
#include <array>
#include <sstream>
#define DEBUG_TYPE …
usingnamespacellvm;
namespace {
class AVRAsmParser : public MCTargetAsmParser { … };
class AVROperand : public MCParsedAsmOperand { … };
}
static MCRegister MatchRegisterName(StringRef Name);
static MCRegister MatchRegisterAltName(StringRef Name);
bool AVRAsmParser::invalidOperand(SMLoc const &Loc,
OperandVector const &Operands,
uint64_t const &ErrorInfo) { … }
bool AVRAsmParser::missingFeature(llvm::SMLoc const &Loc,
uint64_t const &ErrorInfo) { … }
bool AVRAsmParser::emit(MCInst &Inst, SMLoc const &Loc, MCStreamer &Out) const { … }
bool AVRAsmParser::MatchAndEmitInstruction(SMLoc Loc, unsigned &Opcode,
OperandVector &Operands,
MCStreamer &Out, uint64_t &ErrorInfo,
bool MatchingInlineAsm) { … }
int AVRAsmParser::parseRegisterName(MCRegister (*matchFn)(StringRef)) { … }
int AVRAsmParser::parseRegisterName() { … }
int AVRAsmParser::parseRegister(bool RestoreOnFailure) { … }
bool AVRAsmParser::tryParseRegisterOperand(OperandVector &Operands) { … }
bool AVRAsmParser::tryParseExpression(OperandVector &Operands, int64_t offset) { … }
bool AVRAsmParser::tryParseRelocExpression(OperandVector &Operands) { … }
bool AVRAsmParser::parseOperand(OperandVector &Operands, bool maybeReg) { … }
ParseStatus AVRAsmParser::parseMemriOperand(OperandVector &Operands) { … }
bool AVRAsmParser::parseRegister(MCRegister &Reg, SMLoc &StartLoc,
SMLoc &EndLoc) { … }
ParseStatus AVRAsmParser::tryParseRegister(MCRegister &Reg, SMLoc &StartLoc,
SMLoc &EndLoc) { … }
void AVRAsmParser::eatComma() { … }
bool AVRAsmParser::ParseInstruction(ParseInstructionInfo &Info,
StringRef Mnemonic, SMLoc NameLoc,
OperandVector &Operands) { … }
ParseStatus AVRAsmParser::parseDirective(llvm::AsmToken DirectiveID) { … }
ParseStatus AVRAsmParser::parseLiteralValues(unsigned SizeInBytes, SMLoc L) { … }
extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeAVRAsmParser() { … }
#define GET_REGISTER_MATCHER
#define GET_MATCHER_IMPLEMENTATION
#include "AVRGenAsmMatcher.inc"
unsigned AVRAsmParser::validateTargetOperandClass(MCParsedAsmOperand &AsmOp,
unsigned ExpectedKind) { … }